[sealed-types] Draft Spec for JEP 360 Sealed Types (Preview)
gavin.bierman at oracle.com
Mon Apr 20 21:50:00 UTC 2020
The latest (and hopefully final) draft of JEP 360 (Sealed Types) is available at:
The changes since the last draft was circulated in February :
* Some minor typos have been corrected, including changing the title of 8.1.6.
* We have make corrections in a number of places to make it clear that the name
in a `permits` clause is not a type (and can not be annotated, for example).
* We now require a functional interface to not be `sealed`, rather than imposing
checks on target types of lambda expressions.
* We have removed the changes to narrowing reference conversion which allowed
for stricter checking of cast conversions wrt sealed type hierarchies. We have
decided to defer this feature until a later release to allow us to develop a
broader treatment of "disjoint types" that can be used not just in cast
conversion, but in other places such as bounds checking and pattern matching.
The refined cast conversion was nice to have, but really only will make a
difference when we get to patterns in switches, so it makes sense to spend some
more time now considering our design rather than refining cast conversion in a
More information about the amber-spec-experts