method refs: take qualifier's type arguments in account

This commit is contained in:
anna
2012-09-27 18:45:14 +02:00
parent 0e98677a71
commit 2cdfea8b61
4 changed files with 50 additions and 19 deletions

View File

@@ -0,0 +1,16 @@
class MyTest {
interface I {
String m(Foo<String> f);
}
class Foo<X> {
String foo() {
return null;
}
{
I i = Foo<String> :: foo;
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I'">I i1 = Foo<Integer> :: foo;</error>
}
}
}