Refinements for sealed types

Brian Goetz brian.goetz at oracle.com
Mon Aug 19 13:07:35 UTC 2019


>> There are several ways to reduce the ceremony
>> - implicit declaration of sealed subtypes if the super type is sealed
>> - implicit declaration of permit clauses
>> and we may want to choose one, the other or both.

For the record, there is also a third possible way: inferring `extends X`. I don’t particularly love it, especially as it is mutually exclusive with inferring the permits clause.  But I include it for completeness.


More information about the amber-spec-observers mailing list