diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/patseq.check | 1 | ||||
-rw-r--r-- | test/files/run/patseq.scala | 11 | ||||
-rw-r--r-- | test/files/run/patunreachable.check | 1 | ||||
-rw-r--r-- | test/files/run/patunreachable.scala | 9 |
4 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/patseq.check b/test/files/run/patseq.check new file mode 100644 index 0000000000..bc56c4d894 --- /dev/null +++ b/test/files/run/patseq.check @@ -0,0 +1 @@ +Foo diff --git a/test/files/run/patseq.scala b/test/files/run/patseq.scala new file mode 100644 index 0000000000..7fe8072b5f --- /dev/null +++ b/test/files/run/patseq.scala @@ -0,0 +1,11 @@ +// contribution bug #461 + +object Test extends Application { + def foo(ps: String*) = "Foo" + case class X(p: String, ps: String*) + def bar = + X("a", "b") match { + case X(p, ps @ _*) => foo(ps : _*) + } + println(bar) +} diff --git a/test/files/run/patunreachable.check b/test/files/run/patunreachable.check new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/test/files/run/patunreachable.check @@ -0,0 +1 @@ +2 diff --git a/test/files/run/patunreachable.scala b/test/files/run/patunreachable.scala new file mode 100644 index 0000000000..4cc6181e81 --- /dev/null +++ b/test/files/run/patunreachable.scala @@ -0,0 +1,9 @@ +// contribution bug #460 + +object Test extends Application { + val x = Some(3) match { + case Some(1 | 2) => 1 + case Some(3) => 2 + } + println(x) +} |