[java-highlighting] WIP IDEA-372969 Support JEP 512: Compact Source Files and Instance Main Methods

- update language levels partially
- fix tests

GitOrigin-RevId: 8d7b599772eda8dfd999bee9f816ec2609be4adb
This commit is contained in:
Mikhail Pyltsin
2025-06-20 22:02:29 +02:00
committed by intellij-monorepo-bot
parent 19096c38a1
commit 128454480a
41 changed files with 121 additions and 67 deletions

View File

@@ -5,7 +5,7 @@ interface Func<TIn, TOut>{
class Main {
public static void main(final String[] args) {
public static void main() {
Func<Integer, String> func = Integer::<error descr="Reference to 'toString' is ambiguous, both 'toString()' and 'toString(int)' match">toString</error>;
System.out.println(func.run(6));
}

View File

@@ -28,7 +28,7 @@ class MyTest {
System.out.println(i);
}
public static void main(String[] args) {
public static void main() {
foo<error descr="Ambiguous method call: both 'MyTest.foo(I1)' and 'MyTest.foo(I2)' match">(Foo::m)</error>;
}
}
@@ -66,7 +66,7 @@ class MyTest1 {
System.out.println(i);
}
public static void main(String[] args) {
public static void main() {
m<error descr="Ambiguous method call: both 'MyTest1.m(I1)' and 'MyTest1.m(I2)' match">(Foo::new)</error>;
}
}
@@ -103,7 +103,7 @@ class MyTest2 {
System.out.println(i);
}
public static void main(String[] args) {
public static void main() {
m<error descr="Ambiguous method call: both 'MyTest2.m(I1)' and 'MyTest2.m(I2)' match">(Foo::new)</error>;
}
}

View File

@@ -1,6 +1,6 @@
class App {
public static void main(String[] args) {
public static void main() {
test(App::getLength);
}