summaryrefslogtreecommitdiff
path: root/test/files/pos/t0816.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-01-28 05:46:06 +0000
committerPaul Phillips <paulp@improving.org>2010-01-28 05:46:06 +0000
commitf6c69106d3baa59479e839727acc03ae4035519d (patch)
treeaf854700d4d9d2e0e0f330a08be2ca77c3dfe9ef /test/files/pos/t0816.scala
parent953fecc029a25c1c0cdd1ce847294bc6f7db8e33 (diff)
downloadscala-f6c69106d3baa59479e839727acc03ae4035519d.tar.gz
scala-f6c69106d3baa59479e839727acc03ae4035519d.tar.bz2
scala-f6c69106d3baa59479e839727acc03ae4035519d.zip
One of those "$.05 for the bolt, $50,000 for kn...
One of those "$.05 for the bolt, $50,000 for knowing where to put it" commits. Closes #425, #816, #2310, #2691. All credit for this patch goes to me for having the genius to know when new eyes were needed (although if you're feeling generous some could also go to walter korman for the actual debugging and code writing part.)
Diffstat (limited to 'test/files/pos/t0816.scala')
-rw-r--r--test/files/pos/t0816.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/t0816.scala b/test/files/pos/t0816.scala
new file mode 100644
index 0000000000..0128a0ad72
--- /dev/null
+++ b/test/files/pos/t0816.scala
@@ -0,0 +1,12 @@
+abstract class Atest(val data: String)
+
+case class Btest(override val data: String, val b: Boolean) extends Atest(data)
+
+case class Ctest(override val data: String) extends Btest(data, true)
+
+class testCaseClass {
+ def test(x: Atest) = x match {
+ case Ctest(data) => Console.println("C")
+ case Btest(data, b) => Console.println("B")
+ }
+}