diff options
-rw-r--r-- | test/files/pos/bug2691.scala | 10 | ||||
-rw-r--r-- | test/files/pos/bug3020.scala | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/pos/bug2691.scala b/test/files/pos/bug2691.scala new file mode 100644 index 0000000000..1037b53601 --- /dev/null +++ b/test/files/pos/bug2691.scala @@ -0,0 +1,10 @@ +object Breakdown { + def unapplySeq(x: Int): Some[List[String]] = Some(List("", "there")) +} +object Test { + 42 match { + case Breakdown("") => // needed to trigger bug + case Breakdown("foo") => // needed to trigger bug + case Breakdown("", who) => println ("hello " + who) + } +} diff --git a/test/files/pos/bug3020.scala b/test/files/pos/bug3020.scala new file mode 100644 index 0000000000..016563e27f --- /dev/null +++ b/test/files/pos/bug3020.scala @@ -0,0 +1,9 @@ +object Test { + def main(args: Array[String]): Unit = { + var x = true + + ( { if (x) new scala.util.Random() } .asInstanceOf[Runnable] ) + } +} + + |