mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 09:20:53 +07:00
new inference: method refs: apply reference rules first
This commit is contained in:
@@ -41,14 +41,14 @@ class MyTest1 {
|
||||
static void call2(I2 s) { }
|
||||
|
||||
static void test1() {
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTest1.I1'">I1 s1 = MyTest1 ::m1;</error>
|
||||
call1<error descr="'call1(MyTest1.I1)' in 'MyTest1' cannot be applied to '(<method reference>)'">(MyTest1::m1)</error>;
|
||||
I1 s1 = <error descr="Non-static method cannot be referenced from a static context">MyTest1 ::m1</error>;
|
||||
call1(<error descr="Non-static method cannot be referenced from a static context">MyTest1::m1</error>);
|
||||
I1 s2 = MyTest1 :: m2;
|
||||
call1(MyTest1::m2);
|
||||
I1 s3 = MyTest1::m3;
|
||||
call1(MyTest1::m3);
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTest1.I1'">I1 s4 = MyTest1::m4;</error>
|
||||
call1<error descr="'call1(MyTest1.I1)' in 'MyTest1' cannot be applied to '(<method reference>)'">(MyTest1::m4)</error>;
|
||||
I1 s4 = <error descr="Non-static method cannot be referenced from a static context">MyTest1::m4</error>;
|
||||
call1(<error descr="Non-static method cannot be referenced from a static context">MyTest1::m4</error>);
|
||||
}
|
||||
|
||||
static void test2() {
|
||||
@@ -90,14 +90,14 @@ class MyTest2 {
|
||||
static void call2(I2 s) { }
|
||||
|
||||
static void test1() {
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTest2.I1'">I1 s1 = MyTest2 ::m1;</error>
|
||||
call1<error descr="'call1(MyTest2.I1)' in 'MyTest2' cannot be applied to '(<method reference>)'">(MyTest2::m1)</error>;
|
||||
I1 s1 = <error descr="Non-static method cannot be referenced from a static context">MyTest2 ::m1</error>;
|
||||
call1(<error descr="Non-static method cannot be referenced from a static context">MyTest2::m1</error>);
|
||||
I1 s2 = MyTest2 :: m2;
|
||||
call1(MyTest2::m2);
|
||||
I1 s3 = MyTest2::m3;
|
||||
call1(MyTest2::m3);
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTest2.I1'">I1 s4 = MyTest2::m4;</error>
|
||||
call1<error descr="'call1(MyTest2.I1)' in 'MyTest2' cannot be applied to '(<method reference>)'">(MyTest2::m4)</error>;
|
||||
I1 s4 = <error descr="Non-static method cannot be referenced from a static context">MyTest2::m4</error>;
|
||||
call1(<error descr="Non-static method cannot be referenced from a static context">MyTest2::m4</error>);
|
||||
}
|
||||
|
||||
static void test2() {
|
||||
|
||||
Reference in New Issue
Block a user