Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/CannotCreateArrayWithEmptyDiamond.java
Andrey.Cherkasov 5e014911d3 [java-highlighting] Detect the "Cannot create array with '<>'" error
IDEA-302432

GitOrigin-RevId: ba0f9ed38fc7b2741852296180c10dab346840fc
2022-10-03 11:02:11 +00:00

9 lines
293 B
Java

import java.util.ArrayList;
class Test {
void foo() {
ArrayList<String>[] lists1 = <error descr="Cannot create array with '<>'">new ArrayList<>[5]</error>;
ArrayList<String>[] lists2 = <error descr="Cannot create array with '<>'">new ArrayList</*blah blah blah*/>[5]</error>;
}
}