-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Compiler version
3.0.0-M3
Minimized code
enum Opt[T] {
case Nn extends Opt[Nothing] with Comparable[Nn.type]
def compareTo(nn: Nn.type) = 0
}
Output
2 | case Nn extends Opt[Nothing] with Comparable[Nn.type]
| ^
| Recursive value Nn needs type
Expectation
I expected it to work much like the Scala 2 equivalent:
sealed trait Opt[T]
case object Nn extends Opt[Nothing] with Comparable[Nn.type] {
def compareTo(nn: Nn.type) = 0
}
Btw, this error was also mentioned in #11249 but the original issue there is about vals.
LPTK, neko-kai and bilal-fazlani