new inference: method refs: accept qualifier substitutor when nothing more could be inferred

This commit is contained in:
Anna Kozlova
2014-02-27 18:29:55 +01:00
parent e0f2061c1c
commit 66a8dedb8c
4 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
class Test {
static class Foo<X> {
X m() { return null;}
}
interface I {
Foo<Object> _i(Foo<String> fs);
}
static void foo(I i) { }
{
foo(<error descr="Bad return type in method reference: cannot convert java.lang.String to Test.Foo<java.lang.Object>">Foo::m</error>);
}
}