Here's a minimal demo:
public class OuterStaticNestedDemo<E> {
class Outer {
static class StaticNested {}
}
void qualifiedNew(Outer outer) {
new Outer.StaticNested();
}
}
When I compile with javac, it raises an error (using version 25 here, but it's the same for versions 11, 17 and 21) :
javac -g -source 25 -target 25 OuterStaticNestedDemo.java
OuterStaticNestedDemo.java:8: error: cannot select a static class from a parameterized type
new Outer.StaticNested();
^
1 error
When I compile with ecj, it compiles :
java -jar ecj-3.44.0.jar -g -source 25 -target 25 OuterStaticNestedDemo.java
Could you please fix to raise the same error as javac ?
Here's a minimal demo:
When I compile with javac, it raises an error (using version 25 here, but it's the same for versions 11, 17 and 21) :
When I compile with ecj, it compiles :
java -jar ecj-3.44.0.jar -g -source 25 -target 25 OuterStaticNestedDemo.javaCould you please fix to raise the same error as javac ?