summaryrefslogtreecommitdiff
path: root/test/files/neg/t7877.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-09-26 17:10:39 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-09-27 10:04:17 +0200
commitd290d0d1afe122fdeb3798364be7cda72cc182ec (patch)
treea49b12b40ffbcfe4a22df9adf2c5339a0af2757d /test/files/neg/t7877.check
parentbda48577d022811be58ce2b7f9e46890543ad45b (diff)
downloadscala-d290d0d1afe122fdeb3798364be7cda72cc182ec.tar.gz
scala-d290d0d1afe122fdeb3798364be7cda72cc182ec.tar.bz2
scala-d290d0d1afe122fdeb3798364be7cda72cc182ec.zip
SI-7877 Only look for unapplies in term trees
Since Scala 2.10.2, the enclosed test case has crashed in the backend. Before, we correctly rejected this pattern match. My bisection landed at a merge commit f16f4ab157, although both parents were good. So I don't quite trust that. I do think the regression stems from the changes to allow: case rx"AB(.+)" => Examples of this are in run/t7715.scala. This commit limits the search for extractors to cases where the function within the Apply is a term tree.
Diffstat (limited to 'test/files/neg/t7877.check')
-rw-r--r--test/files/neg/t7877.check7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t7877.check b/test/files/neg/t7877.check
new file mode 100644
index 0000000000..7f7f832463
--- /dev/null
+++ b/test/files/neg/t7877.check
@@ -0,0 +1,7 @@
+t7877.scala:6: error: not found: value Y
+ case Y() => () // not allowed
+ ^
+t7877.scala:7: error: OnNext[Any] does not take parameters
+ case OnNext[Any]() => () // should *not* be allowed, but was.
+ ^
+two errors found