switch exhaustiveness check not working within deconstruction pattern.

David Alayachew davidalayachew at gmail.com
Sun Nov 13 18:54:31 UTC 2022


I just tested this locally, and this works on the latest version of Java
19. Compiles successfully. Can you confirm that that is the version that
you are using?

Running the following command should print the following output (or
something similar).

$ java --version
openjdk 19 2022-09-20
OpenJDK Runtime Environment (build 19+36-2238)
OpenJDK 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)

$ javac Main.java --enable-preview --release 19
Note: Main.java uses preview features of Java SE 19.
Note: Recompile with -Xlint:preview for details.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20221113/d8ca572b/attachment-0001.htm>


More information about the amber-dev mailing list