diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-05-26 20:50:28 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-05-27 16:41:37 +0200 |
commit | 8f08b714424b3ada8a12156bdc3fd43e13ad09ee (patch) | |
tree | 2d874cd0d7f2775e8d6ce1a67b954d3601f5beac /tests/pos/vararg-pattern.scala | |
parent | 87b779bc96e10adc6a05635393cecc9ecbb2b4ea (diff) | |
download | dotty-8f08b714424b3ada8a12156bdc3fd43e13ad09ee.tar.gz dotty-8f08b714424b3ada8a12156bdc3fd43e13ad09ee.tar.bz2 dotty-8f08b714424b3ada8a12156bdc3fd43e13ad09ee.zip |
Annotate repeated params with `case` flag to indicate that they are legal
One drawback with this approach is that the type seems to propagate.
I.e. if the return type of an expression is `repeated` then the
enclosing variable will get the `repeated` type instead of getting the
expected `Seq` type
Diffstat (limited to 'tests/pos/vararg-pattern.scala')
-rw-r--r-- | tests/pos/vararg-pattern.scala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/pos/vararg-pattern.scala b/tests/pos/vararg-pattern.scala index 314d6460f..430973a28 100644 --- a/tests/pos/vararg-pattern.scala +++ b/tests/pos/vararg-pattern.scala @@ -1,12 +1,9 @@ object Test { - List(1, 2, 3, 4) match { case List(1, 2, xs: _*) => val ys: Seq[Int] = xs println(ys) } - val List(1, 2, x: _*) = List(1, 2, 3, 4) + val List(1, 2, x: _*) = List(1, 2, 3, 4) } - - |