Skip to content

Add test for inherited method on functional interface #5023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
interface ChildInterface extends ParentInterface {}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
interface ParentInterface {
public int f(int x);
}
Binary file modified jbmc/regression/jbmc/lambda-unhandled-types/Test.class
Binary file not shown.
1 change: 1 addition & 0 deletions jbmc/regression/jbmc/lambda-unhandled-types/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ public static void main() {
StubSuperinterface stubSuperinterface = (x -> x);
InterfaceDeclaringEquals interfaceDeclaringEquals = (x -> x);
InterfaceWithDefaults interfaceWithDefaults = (x -> x);
ChildInterface inheritedInterface = x -> x;
}
}
8 changes: 5 additions & 3 deletions jbmc/regression/jbmc/lambda-unhandled-types/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ Test.class
^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.
^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.
^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.
^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.
--
--
This exercises four cases that aren't currently supported: stub interfaces, stub
This exercises five cases that aren't currently supported: stub interfaces, stub
superinterfaces, interfaces that declare methods also declared on
java.lang.Object, and interfaces that provide default methods. All we require at
this point is that jbmc shouldn't crash when these are seen.
java.lang.Object, interfaces that provide default methods, interfaces that
inherit their one method. All we require at this point is that jbmc shouldn't
crash when these are seen.