method refs: compilation error when static method is accept through instance reference

This commit is contained in:
anna
2013-02-26 14:16:08 +01:00
parent af83c60af8
commit ed8986937e
6 changed files with 24 additions and 5 deletions

View File

@@ -68,7 +68,7 @@ class MyTest3 {
static void m() { }
public static void main(String[] args) {
I s = new MyTest3()::m;
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTest3.I'">I s = new MyTest3()::m;</error>
}
}