Draft JEP for Third Preview of Primitive Types in Patterns, instanceof, and switch

Angelos Bimpoudis angelos.bimpoudis at oracle.com
Wed Apr 2 14:51:59 UTC 2025


Dear experts,

A draft JEP for the third preview of primitive types in patterns, instanceof,
and switch is now available and submitted. We propose to preview it for a third
time with no changes relative to JDK 24.

https://openjdk.org/jeps/8349215

To recall, this feature drops restrictions around switch and instanceof. During
the evolution of this feature we established new terminology and functionality
to safeguard against loss of information or other exceptional cases across all
types, uniformly. One of the goals of this feature is to not introduce new
conversions, rather to safeguard against all existing ones. Re-previewing as is
for the third time gives us the opportunity to examine Chapter 5 of the JLS
holistically and identify opportunities that could pave the road to other
potential language features, e.g., constant patterns, null-restricted value
class types etc.

Thank you,
Angelos



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20250402/c8ed523b/attachment-0001.htm>


More information about the amber-spec-experts mailing list