mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
new overload resolution: testdata
This commit is contained in:
@@ -20,7 +20,7 @@ class MyTest {
|
||||
static void foo(I3 i) {}
|
||||
|
||||
static {
|
||||
foo(MyTest::m);
|
||||
foo<error descr="Cannot resolve method 'foo(<method reference>)'">(MyTest::m)</error>;
|
||||
foo<error descr="Ambiguous method call: both 'MyTest.foo(I1)' and 'MyTest.foo(I2)' match">(MyTest::m1)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,6 @@ class MyTest1 {
|
||||
static void foo(I3 i) {}
|
||||
|
||||
static {
|
||||
foo(Foo::new);
|
||||
foo<error descr="Cannot resolve method 'foo(<method reference>)'">(Foo::new)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,12 +62,12 @@ class MyTest1 {
|
||||
System.out.println(i);
|
||||
}
|
||||
|
||||
private static void m(I3 i) {
|
||||
private static void <warning descr="Private method 'm(MyTest1.I3)' is never used">m</warning>(I3 i) {
|
||||
System.out.println(i);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
m(Foo::new);
|
||||
m<error descr="Ambiguous method call: both 'MyTest1.m(I2)' and 'MyTest1.m(I3)' match">(Foo::new)</error>;
|
||||
}
|
||||
}
|
||||
class MyTest2 {
|
||||
|
||||
@@ -115,10 +115,10 @@ class MyTest2 {
|
||||
static void call3(I1 s) {}
|
||||
static void call3(I2 s) {}
|
||||
static {
|
||||
call3(<error descr="Non-static method cannot be referenced from a static context">MyTest2::m1</error>);
|
||||
call3(MyTest2::m2);
|
||||
call3(MyTest2::m3);
|
||||
call3(<error descr="Non-static method cannot be referenced from a static context">MyTest2::m4</error>);
|
||||
call3<error descr="Cannot resolve method 'call3(<method reference>)'">(MyTest2::m1)</error>;
|
||||
call3<error descr="Cannot resolve method 'call3(<method reference>)'">(MyTest2::m2)</error>;
|
||||
call3<error descr="Cannot resolve method 'call3(<method reference>)'">(MyTest2::m3)</error>;
|
||||
call3<error descr="Cannot resolve method 'call3(<method reference>)'">(MyTest2::m4)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user