diff options
author | chibash <chiba@javassist.org> | 2014-11-23 01:08:22 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2014-11-23 01:08:22 +0900 |
commit | f2093c28be24336593e1ebd9c2c633ee0f8c5b5c (patch) | |
tree | a143744ccbf9c43fa70e88940f36f96136870e79 /src/test/test5 | |
parent | e000e8f682a284b7b5d0c03ca32866e745045fa0 (diff) | |
download | javassist-f2093c28be24336593e1ebd9c2c633ee0f8c5b5c.tar.gz javassist-f2093c28be24336593e1ebd9c2c633ee0f8c5b5c.zip |
fiexed JASSIST-238
Diffstat (limited to 'src/test/test5')
-rw-r--r-- | src/test/test5/DefaultMethod.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/test5/DefaultMethod.java b/src/test/test5/DefaultMethod.java new file mode 100644 index 00000000..7cabb1f3 --- /dev/null +++ b/src/test/test5/DefaultMethod.java @@ -0,0 +1,19 @@ +package test5; + +interface DefaultMethodSupIntf { + default int foo() { return 0; } +} + +interface DefaultMethodIntf extends DefaultMethodSupIntf { + default int foo() { return 1; } + static int baz() { return 10; } +} + +public class DefaultMethod implements DefaultMethodIntf { + public int bar() { return DefaultMethodIntf.super.foo(); } + + public static void main(String[] args) { + int i = new DefaultMethod().bar() + new DefaultMethod().foo() + DefaultMethodIntf.baz(); + System.out.println(i); + } +} |