Closed
Description
- enums should have sensible flags: Lazy enums. #5034
- forbid extending
java.lang.Enum
outside of anenum
Prevent extending java.lang.Enum except from an enum #7499 - allow extending
java.lang.Enum
arbitrarily with3.0-migration
Problem extending java.lang.Enum #7174 - desugar parent
java.lang.Enum
before TASTy extending java.lang.Enum should be desugared before TASTy #7478 -
toString
ergonomics Enum implementation overrides customtoString
#7227 -
.values
on enum companion is not in order: 0.16.0-RC3 Enum.values
does not return enums in order #6663 - drop
scala.runtime.EnumValues
: Drop EnumValues from Enums' modules' API #6620 - Require that the first class in the extends clause of an enum case is the enum class: enum branches can extend any class #6601
- variance not copied from base class type parameters: Variance not copied into enum case class type parameters #9260, Recursive extension method using implicit argument with generic fails to infer correct types #9509
- serialization incorrect for simple enum cases: Singleton enum cases (marked
Serializable
) are incorrectly serialized #9179 - bytecode issues
-
Bad type operand on stack
: Invoke compiled enum class file from dotr failed #7424, Compiling code with Enums in without doing a clean compile causes runtime VerifyError #6664 -
java.lang.NoSuchFieldError
: NoSuchFieldError When Usingenum
Variants from the REPL #7410, NoSuchFieldError when changing type parameter on enum case (incremental compilation) #6677, enum case object not accessible in package object at runtime #7287, Cannot access enum from dependency at runtime #7991
-
- Decide if we drop
scala.Enum
Should we remove scala.Enum trait as a parent of enums? #9873- Answer for this is we rename it to
scala.reflect.Enum
- Answer for this is we rename it to
- Allowing new mixins in individual cases for java enums: java style enums should not allow mixins in cases #9162 (decided not really a problem)
- Decide if
.apply
on enum companion should give precise type or not. (@smarter)- Additionally if so, decide if simple enum constants become
case object
notval
.
- Additionally if so, decide if simple enum constants become
- crash with java enum and varargs: Enum compiler crash with -Ycheck:all #7734
- implement precise return type on
.apply
for companion objects of class enum cases, and widen the class to the base enum when inferring types. - drop
enumLabel
- keep values array and valueOf only when singleton values appear
- make
$fromOrdinal
companion method public and rename tofromOrdinal