Closed
Description
After enum A extends AnyRef
the REPL thinks the line is not over and requires braces. The REPL should instead do the same it does for classes:
scala> class A extends AnyRef
// defined class A
scala> enum A extends AnyRef
| {}
// defined class A
(noticed while testing #5008).
EDIT: enum A extends AnyRef {}
is forbidden by the grammar, see below.