summaryrefslogtreecommitdiff
path: root/test/files/pos/bug1843.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-07-12 01:33:45 +0000
committerPaul Phillips <paulp@improving.org>2009-07-12 01:33:45 +0000
commit5a0c92b0796c2e8453495b7c8086926466ce3bd2 (patch)
tree2de1cbcddacf88bc4e3756aa50785e37826749da /test/files/pos/bug1843.scala
parentfdd7b82c5a6fe2fb2c9ac1520d28f0dffc7580fa (diff)
downloadscala-5a0c92b0796c2e8453495b7c8086926466ce3bd2.tar.gz
scala-5a0c92b0796c2e8453495b7c8086926466ce3bd2.tar.bz2
scala-5a0c92b0796c2e8453495b7c8086926466ce3bd2.zip
Fix and test case for #1843.
Diffstat (limited to 'test/files/pos/bug1843.scala')
-rw-r--r--test/files/pos/bug1843.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/files/pos/bug1843.scala b/test/files/pos/bug1843.scala
new file mode 100644
index 0000000000..cc73353b75
--- /dev/null
+++ b/test/files/pos/bug1843.scala
@@ -0,0 +1,25 @@
+/**
+* Scala Compiler Will Crash On this File
+* ... Or Will It?
+*
+*/
+
+object Crash {
+ trait UpdateType[A]
+ case class StateUpdate[A](updateType : UpdateType[A], value : A)
+ case object IntegerUpdateType extends UpdateType[Integer]
+
+ //However this method will cause a crash
+ def crash(updates: List[StateUpdate[_]]) {
+ updates match {
+ case Nil =>
+ case u::us =>
+ u match {
+ //Line below seems to be the crashing line
+ case StateUpdate(key, newValue) if (key == IntegerUpdateType) =>
+ println("Requires a statement to induce the crash")
+ case _ =>
+ }
+ }
+ }
+}