Pull request #4376 regressed compilation of all inner classes using <enclosing class>.super pattern in their constructor argument to fail with:
error: cannot reference super before supertype constructor has been called
Following source fragment can be used as a minimal test case:
class EnclClass {
class InnerClass extends Exception {
InnerClass() {
super(EnclClass.super.toString());
}
}
}
error: cannot reference super before supertype constructor has been called
Following source fragment can be used as a minimal test case:
class EnclClass {
class InnerClass extends Exception {
InnerClass() {
super(EnclClass.super.toString());
}
}
}
- relates to
-
JDK-8261006 'super' qualified method references cannot occur in a static context
-
- Resolved
-