Closed
Description
Compiler version
Minimized example
enum Orientation extends AnyVal:
case North, South, East, West
Output Error/Warning message
-- [E074] Syntax Error: t.scala:2:5 --------------------------------------------
2 |enum Orientation extends AnyVal:
| ^
| Value classes may not be abstract
-- [E093] Syntax Error: t.scala:3:29 -------------------------------------------
3 | case North, South, East, West
| ^
| anonymous class {...} cannot extend final class Orientation
|-----------------------------------------------------------------------------
| Explanation (enabled by `-explain`)
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| A class marked with the final keyword cannot be extended
-----------------------------------------------------------------------------
Why this Error/Warning was not helpful
The message leaks implementation details about desugaring...
Suggested improvement
A message saying that enums cannot extend AnyVal
is better here