Summary
Fix for JDK-8334488 introduced a regression in JDK-24, there are several fixes, some of them currently under review, that will fix the introduced regression.
Problem
The fix for JDK-8334488 introduced a regression in JDK-24. Code like the following:
class Test {
Test() {}
Test(int a) {
new InnerLocal() {}; //compilation fails here
this();
}
}
Is now incorrectly rejected by the javac compiler.
Solution
Since the aforementioned fix is correct, the fix will be left in place in 24, despite the regression. We have a fix in the work that will help remove the introduced regression is [1]. This second fix represents a major change to the compiler pipeline and for this reason it was deemed too risky to be integrated into JDK 23.
Specification
There are no changes to the specification.
- csr of
-
JDK-8334488 Improve error for illegal early access from nested class
-
- Resolved
-