diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-01-30 21:53:27 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2016-05-20 16:12:03 -0700 |
commit | eeef2602dc97f84c798713d7a2c924ea2b0d6012 (patch) | |
tree | 06a2e64b97d73f303583f82af8bdfafc75aff477 /test/files/neg/t8044.check | |
parent | 15189d14953335f7a3a8310861d045d21ab22d48 (diff) | |
download | scala-eeef2602dc97f84c798713d7a2c924ea2b0d6012.tar.gz scala-eeef2602dc97f84c798713d7a2c924ea2b0d6012.tar.bz2 scala-eeef2602dc97f84c798713d7a2c924ea2b0d6012.zip |
SI-8044 Allow binding backquoted varid in patterns
Previously, a varid could not be backquoted, so that it was not
possible to introduce variables with names such as `type` in a
match expression.
This commit allows backquoted varids in `case x @ _` and
`case x: Int`. In neither position is a stable id accepted,
that is, an id with leading uppercase.
Therefore, this commit merely relaxes the backquoted varid to
be taken as a normal varid in these contexts.
Diffstat (limited to 'test/files/neg/t8044.check')
-rw-r--r-- | test/files/neg/t8044.check | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/neg/t8044.check b/test/files/neg/t8044.check new file mode 100644 index 0000000000..678bf8c700 --- /dev/null +++ b/test/files/neg/t8044.check @@ -0,0 +1,4 @@ +t8044.scala:3: error: not found: value _ + def f = 42 match { case `_` : Int => `_` } // doesn't leak quoted underscore + ^ +one error found |