Java: better error reporting and quick fixes for the diamond operator and generic array creation (IDEA-299195)

GitOrigin-RevId: baa354ad9132bf6d939f19ecd2cfd6cfc56466a2
This commit is contained in:
Bas Leijdekkers
2024-01-08 15:11:58 +01:00
committed by intellij-monorepo-bot
parent 7e1c830a1a
commit ab928055bb
12 changed files with 78 additions and 35 deletions

View File

@@ -40,7 +40,7 @@ class OnArrayTest {
ArrayReturnType<String[]> a3 = <error descr="Bad return type in method reference: cannot convert int[] to java.lang.String[]">int[]::new</error>;
ObjectArrayReturnType a4 = Foo<?>[]::new;
ObjectArrayReturnType a5 = <error descr="Generic array creation">Foo<? extends String>[]</error>::new;
ObjectArrayReturnType a5 = Foo<error descr="Generic array creation not allowed"><? extends String></error>[]::new;
}
}