new inference: method refs: apply reference rules first

This commit is contained in:
Anna Kozlova
2014-02-27 20:35:26 +01:00
parent cf7dff45a9
commit e7cb908c95
7 changed files with 61 additions and 24 deletions

View File

@@ -0,0 +1,15 @@
class Test {
interface I {
void m(Test rec, String s);
}
void m(Test t, String s) {}
void m(String s) {}
static void m(Test t, Object s) {}
static void test() {
<error descr="Incompatible types. Found: '<method reference>', required: 'Test.I'">I i = Test::m;</error>
}
}