enhanced enums - back from the dead?

Brian Goetz brian.goetz at oracle.com
Mon Dec 10 23:58:59 UTC 2018


> If we restrict this only to enums, of course this would be a non-issue; as you say, enums are non-generic right now, so we have a clean slate (assuming we're ok with the asymmetry).
> 


There’s an even more conservative option: restrict this only to the type variable of Enum<T extends Enum<T>>, not just to the type variables of all supertypes of an enum.  Then, the asymmetry is undetectable, in that it is illegal for a non-enum class to extend Enum, right?  



More information about the amber-spec-experts mailing list