sealed: add release-level and Jackson 3.2.3 transcripts
09 shows which language level each sealed feature needs; 10 runs the Payment model through Jackson 3 (jars fetched and sha1-checked, not committed). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
$ javac --release 16 src/ImplicitPermits.java (25.0.4.1+1-LTS)
|
||||
src/ImplicitPermits.java:4: error: sealed classes are not supported in -source 16
|
||||
public sealed class ImplicitPermits {
|
||||
^
|
||||
(use -source 17 or higher to enable sealed classes)
|
||||
1 error
|
||||
exit=1
|
||||
|
||||
$ javac --release 17 src/ImplicitPermits.java (25.0.4.1+1-LTS)
|
||||
exit=0
|
||||
|
||||
$ javac --release 17 src/PaymentDemo.java (25.0.4.1+1-LTS)
|
||||
src/PaymentDemo.java:11: error: patterns in switch statements are not supported in -source 17
|
||||
case Card(String last4, long amount) -> amount * 2 / 100; // 2 percent
|
||||
^
|
||||
(use -source 21 or higher to enable patterns in switch statements)
|
||||
src/PaymentDemo.java:11: error: deconstruction patterns are not supported in -source 17
|
||||
Reference in New Issue
Block a user