summaryrefslogtreecommitdiff
path: root/test/files/run/t4025.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-05-12 13:21:58 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-05-12 13:21:58 +0200
commit3bbf6328dc325363dedfbc6068e7ae3fbbc10cdb (patch)
tree4fb3acb280ae9a5e45e24bf684ea194307a2cb32 /test/files/run/t4025.scala
parent3511e5960d510eafcb67c388ec0b5b60aafdd8f3 (diff)
downloadscala-3bbf6328dc325363dedfbc6068e7ae3fbbc10cdb.tar.gz
scala-3bbf6328dc325363dedfbc6068e7ae3fbbc10cdb.tar.bz2
scala-3bbf6328dc325363dedfbc6068e7ae3fbbc10cdb.zip
A REPL pattern matching crasher that crashes no more.
Not due to virtpatmat, mind you; it passes with -Xoldpatmat. Closes SI-4025.
Diffstat (limited to 'test/files/run/t4025.scala')
-rw-r--r--test/files/run/t4025.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t4025.scala b/test/files/run/t4025.scala
new file mode 100644
index 0000000000..5db0093970
--- /dev/null
+++ b/test/files/run/t4025.scala
@@ -0,0 +1,12 @@
+import scala.tools.nsc.Settings
+import scala.tools.partest.ReplTest
+
+object Test extends ReplTest {
+ def code = """
+class Color(val red: Int)
+
+case class Red(r:Int) extends Color(r)
+
+def f(c: Any) = c match { case Red(_) => () }
+"""
+}