diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-07 18:14:29 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-07 18:14:29 +0100 |
commit | 377eb3318cdacd2dfb91d56be3649431ec1155f0 (patch) | |
tree | 058530f166821fdc58df3ba9833006c9da3d481c /tests/pos | |
parent | e74b6316b93993e3c798bd9df45d83fc0665c52e (diff) | |
download | dotty-377eb3318cdacd2dfb91d56be3649431ec1155f0.tar.gz dotty-377eb3318cdacd2dfb91d56be3649431ec1155f0.tar.bz2 dotty-377eb3318cdacd2dfb91d56be3649431ec1155f0.zip |
Fixes for desugarings of case classes.
Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
Diffstat (limited to 'tests/pos')
-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 |