mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
new inference: method refs: accept qualifier substitutor when nothing more could be inferred
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ class MyTest {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
foo<error descr="Ambiguous method call: both 'MyTest.foo(I1)' and 'MyTest.foo(I2)' match">(Foo::m)</error>;
|
||||
foo<error descr="Ambiguous method call: both 'MyTest.foo(I2)' and 'MyTest.foo(I3)' match">(Foo::m)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
@@ -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>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user