aboutsummaryrefslogtreecommitdiff
path: root/tests/run/enum-List3.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/enum-List3.scala')
-rw-r--r--tests/run/enum-List3.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run/enum-List3.scala b/tests/run/enum-List3.scala
new file mode 100644
index 000000000..e5ffe1a28
--- /dev/null
+++ b/tests/run/enum-List3.scala
@@ -0,0 +1,10 @@
+enum List[+T] {
+ 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)
+}
+