diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-04-04 16:51:41 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-04-08 23:01:09 -0700 |
commit | e7aadd00392a512ddcf53396d489f0f17bfac231 (patch) | |
tree | ff62223bed6f9beafd97bd8bbb383adff5c54e8e /test/files/neg/t414.check | |
parent | 53e031f55386d131b1aaa5fb93ee1a3ac6bce646 (diff) | |
download | scala-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/t414.check')
-rw-r--r-- | test/files/neg/t414.check | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/neg/t414.check b/test/files/neg/t414.check index e15dbaea71..30211eef8e 100644 --- a/test/files/neg/t414.check +++ b/test/files/neg/t414.check @@ -1,7 +1,7 @@ t414.scala:5: error: pattern type is incompatible with expected type; found : Empty.type required: IntMap[a] -Note: if you intended to match against the class, try `case _: Empty[_]` or `case Empty()` +Note: if you intended to match against the class, try `case Empty()` case Empty => ^ t414.scala:7: error: type mismatch; |