[java-highlighting] Most of method-reference problems migrated

Part of IDEA-365344 Create a new Java error highlighter with minimal dependencies (PSI only)

GitOrigin-RevId: 03528950826974c1875e89868dc335c88c2e8149
This commit is contained in:
Tagir Valeev
2025-02-04 11:32:57 +01:00
committed by intellij-monorepo-bot
parent 17651f8c19
commit 577de68f8a
14 changed files with 256 additions and 304 deletions

View File

@@ -28,7 +28,7 @@ class AlienTest {
IInt i3 = MyTest::<error descr="Cannot resolve method 'bar'">bar</error>;
IIntInt i4 = MyTest::<error descr="Reference to 'bar' is ambiguous, both 'bar(Integer, Number)' and 'bar(Number, Integer)' match">bar</error>;
IInt i5 = <error descr="Non-static method cannot be referenced from a static context">MyTest::baz</error>;
IInt i6 = <error descr="'foo(int)' is not public in 'MyTest.Foo'. Cannot be accessed from outside package">MyTest.foo::foo</error>;
IInt i6 = MyTest.foo::<error descr="'foo(int)' is not public in 'MyTest.Foo'. Cannot be accessed from outside package">foo</error>;
IInt i7 = MyTest.<error descr="'MyTest.Foo' has private access in 'MyTest'">Foo</error>::foo;
}
}

View File

@@ -38,5 +38,5 @@ class Test2 {
void foo(Integer i) {}
Object o = <error descr="Object is not a functional interface">Test2::foo</error>;
Object o = <error descr="java.lang.Object is not a functional interface">Test2::foo</error>;
}

View File

@@ -4,7 +4,7 @@ class Test<X> {
}
void test() {
I i1 = <error descr="Parameterized qualifier on static method reference">Test<String>::foo</error>;
I i1 = Test<error descr="Parameterized qualifier on static method reference"><String></error>::foo;
I i2 = Test::foo;
}