Closed
Description
Scalac rejects case classes such as:
@ case class A[T]
(console):1: case classes must have a parameter list; try 'case class A()' or 'case object A'
case class A[T]
^
Dotty currently accepts them. This can be confusing in pattern matching: it looks like pattern case A =>
is matching on instances of class A
, but it's actually matching on the companion object.