Permalink
Browse files

A REPL pattern matching crasher that crashes no more.

Not due to virtpatmat, mind you; it passes with -Xoldpatmat.

Closes SI-4025.
  • Loading branch information...
retronym committed May 12, 2012
1 parent 3511e59 commit 3bbf6328dc325363dedfbc6068e7ae3fbbc10cdb
Showing with 31 additions and 0 deletions.
  1. +19 −0 test/files/run/t4025.check
  2. +12 −0 test/files/run/t4025.scala
View
@@ -0,0 +1,19 @@
Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala> class Color(val red: Int)
defined class Color
scala>
scala> case class Red(r:Int) extends Color(r)
defined class Red
scala>
scala> def f(c: Any) = c match { case Red(_) => () }
f: (c: Any)Unit
scala>
View
@@ -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(_) => () }
"""
}

0 comments on commit 3bbf632

Please sign in to comment.