Skip to content

Commit 5466c08

Browse files
author
thk123
committed
Improve error message when functional method is inherited
This error can be erroneously triggered both when there are default methods on the interface (meaning >1 methods) or when the method is actually defined in an inherited interface (meaning 0 methods). Extend the warning message to explain both cases.
1 parent 719e9a9 commit 5466c08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jbmc/src/java_bytecode/lambda_synthesis.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ static optionalt<irep_idt> interface_method_id(
121121
<< functional_interface_tag.get_identifier()
122122
<< " which should have exactly one abstract method but actually has "
123123
<< implemented_interface_type.methods().size()
124-
<< ". Note default methods are not supported yet." << messaget::eom;
124+
<< ". Note default methods are not supported yet."
125+
<< "Also note methods declared in an inherited interface are not "
126+
<< "supported either." << messaget::eom;
125127
return {};
126128
}
127129
return implemented_interface_type.methods().at(0).get_name();

0 commit comments

Comments
 (0)