-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
open is not treated as a normal identifier inside match #15960
Labels
Milestone
Comments
andrelfpinto
added
itype:bug
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Sep 4, 2022
It needs to work a bit harder to disambiguate
It says
but not illegal. |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 4, 2022
The spec in https://dotty.epfl.ch/docs/reference/soft-modifier.html says: > A soft modifier is treated as potential modifier of a definition if it is followed by a hard modifier or a keyword combination starting a definition (def, val, var, type, given, class, trait, object, enum, case class, case object). Between the two words there may be a sequence of newline tokens and soft modifiers. But the implementation recognized also soft modifiers in front of just `case`, not followed by `class` or `object`. The change caused some breakage for enum cases, where we have `case` alone, but that one cannot be preceded by any soft modifiers anyway. So only neg tests were affected. Fixes scala#15960
KacperFKorban
added
area:parser
and removed
stat:needs triage
Every issue needs to have an "area" and "itype" label
labels
Sep 4, 2022
odersky
added a commit
that referenced
this issue
Sep 5, 2022
The spec in https://dotty.epfl.ch/docs/reference/soft-modifier.html says: > A soft modifier is treated as potential modifier of a definition if it is followed by a hard modifier or a keyword combination starting a definition (def, val, var, type, given, class, trait, object, enum, case class, case object). Between the two words there may be a sequence of newline tokens and soft modifiers. But the implementation recognized also soft modifiers in front of just `case`, not followed by `class` or `object`. The change caused some breakage for enum cases, where we have `case` alone, but that one cannot be preceded by any soft modifiers anyway. So only neg tests were affected. Fixes #15960
mpollmeier
pushed a commit
to mpollmeier/dotty
that referenced
this issue
Oct 16, 2022
The spec in https://dotty.epfl.ch/docs/reference/soft-modifier.html says: > A soft modifier is treated as potential modifier of a definition if it is followed by a hard modifier or a keyword combination starting a definition (def, val, var, type, given, class, trait, object, enum, case class, case object). Between the two words there may be a sequence of newline tokens and soft modifiers. But the implementation recognized also soft modifiers in front of just `case`, not followed by `class` or `object`. The change caused some breakage for enum cases, where we have `case` alone, but that one cannot be preceded by any soft modifiers anyway. So only neg tests were affected. Fixes scala#15960
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.1.3
Minimized code
Output
Expectation
bar
should compile asbaz
does.According to this:
It seems like
open
is not being treated as a normal identifier insidematch
.The text was updated successfully, but these errors were encountered: