summaryrefslogtreecommitdiff
path: root/test/files/run/t6089.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t6089.scala')
-rw-r--r--test/files/run/t6089.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/t6089.scala b/test/files/run/t6089.scala
new file mode 100644
index 0000000000..c72d7ba792
--- /dev/null
+++ b/test/files/run/t6089.scala
@@ -0,0 +1,13 @@
+case class Foo(x: Int)
+
+object Test {
+ def bippo(result: Boolean): Boolean = result
+ def bungus(m: Foo): Boolean =
+ bippo(m match { case Foo(2) => bungus(m) })
+
+ def main(args: Array[String]): Unit = try {
+ bungus(Foo(0))
+ } catch {
+ case x: MatchError => println(x)
+ }
+} \ No newline at end of file