[External] : Re: Possible refinement for sealed classes

Brian Goetz brian.goetz at oracle.com
Thu Apr 1 20:32:23 UTC 2021


> By example, a type WithCheese may make little sense.
> Anyway, if WithCheese only makes sense for a Sandwich, nesting 
> WithCheese inside Sandwich is the way to go.

This doesn't help unless the *whole* hierarchy is nested in the same 
file.  Otherwise you have to have an explicit permits clause on each of 
Sandwich, WIthCheese, etc.


More information about the amber-spec-observers mailing list