mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
overload resolution: encapsulate overload guard checks + eliminate additional applicability predicate
GitOrigin-RevId: 41c411466ef8def32fb15535dc639a7f7dc29285
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c4eb244441
commit
e26bb55130
@@ -31,8 +31,8 @@ class Test {
|
||||
String i1 = instanceCall(this::m0);
|
||||
String i2 = instanceCall(this::m1);
|
||||
String i3 = instanceCall(this::m2);
|
||||
String i4 = instanceCall<error descr="Ambiguous method call: both 'Test.instanceCall(I0)' and 'Test.instanceCall(I1<Object>)' match">(this::m01)</error>;
|
||||
String i5 = instanceCall<error descr="Ambiguous method call: both 'Test.instanceCall(I0)' and 'Test.instanceCall(I1<Object>)' match">(this::m012)</error>;
|
||||
String i4 = instanceCall(this::<error descr="Cannot resolve method 'm01'">m01</error>);
|
||||
String i5 = instanceCall(this::<error descr="Cannot resolve method 'm012'">m012</error>);
|
||||
}
|
||||
|
||||
void n0() { }
|
||||
@@ -53,7 +53,7 @@ class Test {
|
||||
Test s1 = staticCall(Test::n0);
|
||||
Test s2 = staticCall(Test::n1);
|
||||
Test s3 = staticCall<error descr="Cannot resolve method 'staticCall(<method reference>)'">(Test::n2)</error>;
|
||||
Test s4 = staticCall<error descr="Ambiguous method call: both 'Test.staticCall(I1<Object>)' and 'Test.staticCall(I2<Object, String>)' match">(Test::n01)</error>;
|
||||
Test s5 = staticCall<error descr="Ambiguous method call: both 'Test.staticCall(I1<Object>)' and 'Test.staticCall(I2<Object, String>)' match">(Test::n012)</error>;
|
||||
Test s4 = staticCall(Test::<error descr="Cannot resolve method 'n01'">n01</error>);
|
||||
Test s5 = staticCall(Test::<error descr="Cannot resolve method 'n012'">n012</error>);
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class Test {
|
||||
{
|
||||
Set<String> m = replyWith(this::query);
|
||||
System.out.println(m);
|
||||
Set<String> m1 = replyWith<error descr="Ambiguous method call: both 'Test.replyWith(Function<Object, List<Object>>)' and 'Test.replyWith(Callable<List<Object>>)' match">(this::query1)</error>;
|
||||
Set<String> m1 = replyWith(this::<error descr="Cannot resolve method 'query1'">query1</error>);
|
||||
System.out.println(m1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,6 @@ class Test {
|
||||
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>
|
||||
I i = Test::<error descr="Cannot resolve method 'm'">m</error>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user