You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as detailed in lampepfl/dotty-feature-requests#73, extending java.lang.Enum from a class is forbidden in Java, as Java enums are only guaranteed typesafe when created from its enum construct, additionally, the super call to java/lang/Enum."<init>":(Ljava/lang/String;I)V is synthesised by javac and the constructor is not exposed to Java source programs.
We should do the same in Dotty - extending java.lang.Enum should not be permitted apart from in an enum.
We should also support the old scala 2 way of extending java.lang.Enum with 3.0-migration