Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
18 lines
849 B
Plaintext
18 lines
849 B
Plaintext
$ javac --enable-preview --release 28 src/StrictFields.java
|
|
Note: src/StrictFields.java uses preview features of Java SE 28.
|
|
Note: Recompile with -Xlint:preview for details.
|
|
$ java --enable-preview -cp classes StrictFields classes
|
|
StrictFields$Point x flags=0x0812 strictly-initialized=true
|
|
StrictFields$Point y flags=0x0812 strictly-initialized=true
|
|
StrictFields$Plain x flags=0x0812 strictly-initialized=true
|
|
StrictFields$Plain y flags=0x0812 strictly-initialized=true
|
|
|
|
$ javac --enable-preview --release 28 broken/EarlyConstruction.java
|
|
broken/EarlyConstruction.java:6: error: strict field id is not initialized before the supertype constructor has been called
|
|
super();
|
|
^
|
|
Note: broken/EarlyConstruction.java uses preview features of Java SE 28.
|
|
Note: Recompile with -Xlint:preview for details.
|
|
1 error
|
|
exit 1
|