aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/typers.scala
diff options
context:
space:
mode:
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