Open hamzaremmal opened 1 week ago
https://github.com/scala/scala3/commit/bed0e86180b8e1d83547e99a8ac28efe13cca6c6
enum Orientation extends AnyVal: case North, South, East, West
-- [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 -----------------------------------------------------------------------------
The message leaks implementation details about desugaring...
A message saying that enums cannot extend AnyVal is better here
AnyVal
Compiler version
https://github.com/scala/scala3/commit/bed0e86180b8e1d83547e99a8ac28efe13cca6c6
Minimized example
Output Error/Warning message
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