diff options
Diffstat (limited to 'tests/pos/desugar.scala')
-rw-r--r-- | tests/pos/desugar.scala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/pos/desugar.scala b/tests/pos/desugar.scala index ca52ac6ec..80c7529fa 100644 --- a/tests/pos/desugar.scala +++ b/tests/pos/desugar.scala @@ -10,7 +10,7 @@ object desugar { def foo1(first: Int, second: Int = 2)(third: Int = 3) = first + second def foo2(first: Int)(second: Int = 2)(third: Int = 3) = first + second - object lists { + object caseClasses { self => trait List[+T] { def head: T def tail: List[T] @@ -24,4 +24,13 @@ object desugar { case object Nil extends List[Nothing] } + + import caseClasses._ + + object patDefs { + + val xs = Cons(1, Cons(2, Nil)) + + val Cons(y, ys) = xs + } }
\ No newline at end of file |