Skip to content

Commit ffb82b3

Browse files
author
thk123
committed
Add test for inherited method on functional interface
1 parent 2953f43 commit ffb82b3

File tree

7 files changed

+12
-3
lines changed

7 files changed

+12
-3
lines changed
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
interface ChildInterface extends ParentInterface {
2+
3+
}
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
interface ParentInterface {
2+
public int f(int x);
3+
}
Binary file not shown.

jbmc/regression/jbmc/lambda-unhandled-types/Test.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ public static void main() {
66
StubSuperinterface stubSuperinterface = (x -> x);
77
InterfaceDeclaringEquals interfaceDeclaringEquals = (x -> x);
88
InterfaceWithDefaults interfaceWithDefaults = (x -> x);
9+
ChildInterface inheritedInterface = x -> x;
910
}
1011
}

jbmc/regression/jbmc/lambda-unhandled-types/test.desc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Test.class
88
^ignoring invokedynamic at java::Test.main:\(\)V address 6 which produces type java::StubSuperinterface which should have exactly one abstract method but actually has 0.
99
^ignoring invokedynamic at java::Test.main:\(\)V address 12 which produces type java::InterfaceDeclaringEquals which should have exactly one abstract method but actually has 2.
1010
^ignoring invokedynamic at java::Test.main:\(\)V address 18 which produces type java::InterfaceWithDefaults which should have exactly one abstract method but actually has 2.
11+
^ignoring invokedynamic at java::Test.main:\(\)V address \d+ which produces type java::ChildInterface which should have exactly one abstract method but actually has 0.
1112
--
1213
--
13-
This exercises four cases that aren't currently supported: stub interfaces, stub
14+
This exercises five cases that aren't currently supported: stub interfaces, stub
1415
superinterfaces, interfaces that declare methods also declared on
15-
java.lang.Object, and interfaces that provide default methods. All we require at
16-
this point is that jbmc shouldn't crash when these are seen.
16+
java.lang.Object, interfaces that provide default methods, interfaces that
17+
inherit their one method. All we require at this point is that jbmc shouldn't
18+
crash when these are seen.

0 commit comments

Comments
 (0)