diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-05-12 13:21:58 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-05-12 13:21:58 +0200 |
commit | 3bbf6328dc325363dedfbc6068e7ae3fbbc10cdb (patch) | |
tree | 4fb3acb280ae9a5e45e24bf684ea194307a2cb32 /test/files/run/t4025.scala | |
parent | 3511e5960d510eafcb67c388ec0b5b60aafdd8f3 (diff) | |
download | scala-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.scala | 12 |
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(_) => () } +""" +} |