summaryrefslogtreecommitdiff
path: root/test/files/neg/t7895.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-10-08 21:20:23 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-10-09 09:32:45 +0200
commitd0af55ce1ffb9d77e6a604edb41cda2b955e9f02 (patch)
tree66b9b41e4525287ef892d68ba140a804db475e25 /test/files/neg/t7895.scala
parentacd77803f7da7c369f4ffdc70b5eeec4a23e35ae (diff)
downloadscala-d0af55ce1ffb9d77e6a604edb41cda2b955e9f02.tar.gz
scala-d0af55ce1ffb9d77e6a604edb41cda2b955e9f02.tar.bz2
scala-d0af55ce1ffb9d77e6a604edb41cda2b955e9f02.zip
SI-7895 Avoid cascade of "symbol not found" in pattern matches
If we can't type check the `Foo` in `case Foo(a, b) => (a, b)`, we should enter error symbols for `a` and `b` to avoid further errors being reported in the case body.
Diffstat (limited to 'test/files/neg/t7895.scala')
-rw-r--r--test/files/neg/t7895.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/neg/t7895.scala b/test/files/neg/t7895.scala
new file mode 100644
index 0000000000..87a586a82d
--- /dev/null
+++ b/test/files/neg/t7895.scala
@@ -0,0 +1,6 @@
+class A {
+ (null: Any) match {
+ // We don't want "symbol not found errors" for `a` and `b` in the case body.
+ case Goop(a, b, c) => Tuple2(a, b)
+ }
+}