mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
method refs: check if interface functional (IDEA-125511)
This commit is contained in:
@@ -38,5 +38,5 @@ class Test2 {
|
||||
|
||||
void foo(Integer i) {}
|
||||
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'java.lang.Object'">Object o = Test2::foo;</error>
|
||||
Object o = <error descr="Object is not a functional interface">Test2::foo</error>;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Java8 {
|
||||
public void test() {
|
||||
}
|
||||
|
||||
private int m() {
|
||||
return <error descr="int is not a functional interface">Java8::test</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user