aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/enums.scala
blob: d6f75e2b9e8af5ee8694d36bbedc83fa1f92c4cf (plain) (blame)
1
2
3
4
5
6
7
8
9
enum List[+T] {
  case Cons(x: T, xs: List[T])
  case Nil // error: illegal enum value
  case Snoc[U](xs: List[U], x: U) // error: case with type parameters needs extends clause
}

enum class X {
  case Y // error: case not allowed here
}