summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/run/t4025.check19
-rw-r--r--test/files/run/t4025.scala12
2 files changed, 31 insertions, 0 deletions
diff --git a/test/files/run/t4025.check b/test/files/run/t4025.check
new file mode 100644
index 0000000000..6715003cb6
--- /dev/null
+++ b/test/files/run/t4025.check
@@ -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>
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(_) => () }
+"""
+}