-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: repo-valhalla
-
Component/s: tools
In JLS,
It is a compile-time error if a field access expression using the keyword super occurs in a static context (8.1.3) or in an early construction context (8.8.7) of the current class.
However, with the JEP 401 EA2, the following code compiles.
interface Parent {
boolean check = true;
}
class Medium implements Parent {}
class Test extends Medium {
Test() {}
Test(int a) {
boolean check = super.check;
super();
}
}
It is a compile-time error if a field access expression using the keyword super occurs in a static context (8.1.3) or in an early construction context (8.8.7) of the current class.
However, with the JEP 401 EA2, the following code compiles.
interface Parent {
boolean check = true;
}
class Medium implements Parent {}
class Test extends Medium {
Test() {}
Test(int a) {
boolean check = super.check;
super();
}
}