aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2691.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/t2691.scala')
-rw-r--r--tests/pos/t2691.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos/t2691.scala b/tests/pos/t2691.scala
new file mode 100644
index 000000000..5f0ddd122
--- /dev/null
+++ b/tests/pos/t2691.scala
@@ -0,0 +1,16 @@
+object Breakdown {
+ def unapplySeq(x: Int): Some[List[String]] = Some(List("", "there"))
+}
+object Test {
+ 42 match {
+ case Breakdown("") => // needed to trigger bug
+ case Breakdown("", who) => println ("hello " + who)
+ }
+}
+object Test2 {
+ 42 match {
+ case Breakdown("") => // needed to trigger bug
+ case Breakdown("foo") => // needed to trigger bug
+ case Breakdown("", who) => println ("hello " + who)
+ }
+}