diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-06 14:39:30 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-06 14:39:30 +0100 |
commit | e74b6316b93993e3c798bd9df45d83fc0665c52e (patch) | |
tree | d5e37a01eb53d11a9a928721c93ee1af188054de /tests/pos/desugar.scala | |
parent | 554ac428ede1c7a337b507a2e8b29c1671c7d2ee (diff) | |
download | dotty-e74b6316b93993e3c798bd9df45d83fc0665c52e.tar.gz dotty-e74b6316b93993e3c798bd9df45d83fc0665c52e.tar.bz2 dotty-e74b6316b93993e3c798bd9df45d83fc0665c52e.zip |
Fixing expansion and merge companion defs.
Diffstat (limited to 'tests/pos/desugar.scala')
-rw-r--r-- | tests/pos/desugar.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/pos/desugar.scala b/tests/pos/desugar.scala index ffd114652..ca52ac6ec 100644 --- a/tests/pos/desugar.scala +++ b/tests/pos/desugar.scala @@ -9,5 +9,19 @@ object desugar { def foo0(first: Int, second: Int = 2, third: Int = 3) = first + second 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 { + trait List[+T] { + def head: T + def tail: List[T] + } + + case class Cons[+T](val head: T, val tail: List[T]) extends List[T] + + object Cons { + def apply[T](head: T): Cons[T] = apply(head, Nil) + } + case object Nil extends List[Nothing] + } }
\ No newline at end of file |