diff options
Diffstat (limited to 'test/files/pos/spec-sealed.scala')
-rw-r--r-- | test/files/pos/spec-sealed.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/pos/spec-sealed.scala b/test/files/pos/spec-sealed.scala index a5ee4e3c5f..5782930899 100644 --- a/test/files/pos/spec-sealed.scala +++ b/test/files/pos/spec-sealed.scala @@ -2,7 +2,7 @@ sealed abstract class MyList[@specialized +A] { def head: A def tail: MyList[A] - def ::[@specialized B >: A](x: B): MyList[B] = + def ::[@specialized B >: A](x: B): MyList[B] = new Cons[B](x, this) } @@ -19,7 +19,7 @@ case class Cons[@specialized a](private val hd: a, tl: MyList[a]) extends MyList abstract class IntList extends MyList[Int] object Main extends App { - val xs = 1 :: 2 :: 3 :: MyNil + val xs = 1 :: 2 :: 3 :: MyNil println(xs) } |