diff options
Diffstat (limited to 'tests/run/enum-List2.scala')
-rw-r--r-- | tests/run/enum-List2.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/run/enum-List2.scala b/tests/run/enum-List2.scala new file mode 100644 index 000000000..030de0f84 --- /dev/null +++ b/tests/run/enum-List2.scala @@ -0,0 +1,11 @@ +enum class List[+T] +object List { + case Cons(x: T, xs: List[T]) + case Nil extends List[Nothing] +} +object Test { + import List._ + val xs = Cons(1, Cons(2, Cons(3, Nil))) + def main(args: Array[String]) = println(xs) +} + |