Skip to content

Commit 2be70e6

Browse files
committed
Another test
1 parent adf9009 commit 2be70e6

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/run/enum-List3.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cons(1,Cons(2,Cons(3,Nil)))

tests/run/enum-List3.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
enum List[+T] {
2+
case Cons(x: T, xs: List[T])
3+
case Nil extends List[Nothing]
4+
}
5+
object Test {
6+
import List._
7+
val xs = Cons(1, Cons(2, Cons(3, Nil)))
8+
def main(args: Array[String]) = println(xs)
9+
}
10+

0 commit comments

Comments
 (0)