[sealed] Sealed local classes?
    Maurizio Cimadamore 
    maurizio.cimadamore at oracle.com
       
    Thu Oct 10 08:45:00 UTC 2019
    
    
  
On 10/10/2019 01:50, Brian Goetz wrote:
> Right. We already restrict anon and lambda instances of the sealed 
> type. Not only can't we stably write down their types in the PS 
> attribute, but even if we could, it's so easy to accidentally lose 
> exhaustiveness. 
This is a very good point; if I have type T = A | B | C, but then I have 
'anonymous' Ts flying around, all switches assuming A|B|C are no longer 
exhaustive.
Maurizio
    
    
More information about the amber-spec-experts
mailing list