Add jep513 module: flexible constructor bodies on JDK 25 and 27
Runnable sources, broken examples and captured transcripts for the ankurm.com JEP 513 article, including the JDK 25 vs 27 compiler wording differences. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class Parent { Parent() {} }
|
||||
class ReadFinalBeforeAssign extends Parent {
|
||||
final String label;
|
||||
ReadFinalBeforeAssign(String s) {
|
||||
String t = this.label; // reading a field, even a final one, in the prologue
|
||||
this.label = s;
|
||||
super();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user