aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-15 10:31:04 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-15 10:31:10 +0100
commita134d3975068b2439a8ed356750ffde45e874296 (patch)
treed16c8809ddc924cf6589430d1f376d4bcc7f5c6c /tests/pos/typers.scala
parent79aadfe04c4b3aaae4f56ea6a35c7cac61c4af77 (diff)
downloaddotty-a134d3975068b2439a8ed356750ffde45e874296.tar.gz
dotty-a134d3975068b2439a8ed356750ffde45e874296.tar.bz2
dotty-a134d3975068b2439a8ed356750ffde45e874296.zip
Fix typing of unapplySeq extractor arguments.
Needed a special case for them.
Diffstat (limited to 'tests/pos/typers.scala')
-rw-r--r--tests/pos/typers.scala13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala
index edfd7b218..4edd7c2be 100644
--- a/tests/pos/typers.scala
+++ b/tests/pos/typers.scala
@@ -7,7 +7,7 @@ object typers {
val names = List("a", "b", "c")
val ints = List(1, 2, 3)
-
+
for ((name, n) <- (names, ints).zipped)
println(name.length + n)
@@ -129,4 +129,15 @@ object typers {
val x = new ArrayBuffer[String] // testing overloaded polymorphic constructors
}
+
+ object SeqExtractors {
+ val y = names match {
+ case List(x, z) => x
+ case List(x) => x
+ case List() => ""
+ }
+ val yy: String = y
+ }
+
+
} \ No newline at end of file