summaryrefslogtreecommitdiff
path: root/test/files/neg/t7330.check
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-04-04 16:51:41 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-04-08 23:01:09 -0700
commite7aadd00392a512ddcf53396d489f0f17bfac231 (patch)
treeff62223bed6f9beafd97bd8bbb383adff5c54e8e /test/files/neg/t7330.check
parent53e031f55386d131b1aaa5fb93ee1a3ac6bce646 (diff)
downloadscala-e7aadd00392a512ddcf53396d489f0f17bfac231.tar.gz
scala-e7aadd00392a512ddcf53396d489f0f17bfac231.tar.bz2
scala-e7aadd00392a512ddcf53396d489f0f17bfac231.zip
SI-7330 better error when pattern isn't a value
Somehow an applied type managed to sneak past the type checker in pattern mode. Patterns must be values, though. `case C[_] =>` was probably meant to be `case _: C[_] =>` Advice is dispensed accordingly. (Generalizing the existing advice machinery.)
Diffstat (limited to 'test/files/neg/t7330.check')
-rw-r--r--test/files/neg/t7330.check5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/neg/t7330.check b/test/files/neg/t7330.check
new file mode 100644
index 0000000000..b96d656d2b
--- /dev/null
+++ b/test/files/neg/t7330.check
@@ -0,0 +1,5 @@
+t7330.scala:4: error: pattern must be a value: Y[_]
+Note: if you intended to match against the class, try `case _: Y[_]`
+ 0 match { case Y[_] => }
+ ^
+one error found