summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/matchonseq.check2
-rw-r--r--test/files/run/matchonseq.scala8
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/run/matchonseq.check b/test/files/run/matchonseq.check
new file mode 100644
index 0000000000..3fe554095a
--- /dev/null
+++ b/test/files/run/matchonseq.check
@@ -0,0 +1,2 @@
+It worked! head=1
+It worked! last=3
diff --git a/test/files/run/matchonseq.scala b/test/files/run/matchonseq.scala
new file mode 100644
index 0000000000..49b406a6ec
--- /dev/null
+++ b/test/files/run/matchonseq.scala
@@ -0,0 +1,8 @@
+object Test extends App{
+ Vector(1,2,3) match {
+ case head +: tail => println("It worked! head=" + head)
+ }
+ Vector(1,2,3) match {
+ case init :+ last => println("It worked! last=" + last)
+ }
+}