Sealed Types: JLS Changes (Draft)

OpenJDK recently announced a new draft language spec for sealed types

Following the recent announcement of the candidate JEP on sealed types (preview), Gavin Bierman's message "Draft JLS spec for sealed types" on the OpenJDK amber-spec-experts mailing list announces "a draft language spec for sealed types" and provides a link to that draft. That message also states: "This spec doesn't yet contain details on binary compatibility (Chapter 13) — to appear in the next draft."

You may also like: Candidate JEPs: Records and Sealed Types 

In this post, I highlight some of the proposed changes to the Java Language Specification (JLS) for sealed types. It is important to keep in mind the tentativeness of these proposed changes: this is an of JLS changes for a feature associated with a JDK Enhancement Proposal (JEP).