-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Should we allow the case ? =>
syntax for match types?
#13223
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
Labels
Comments
I think we should disallow |
So also disallow To be honest I find |
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 3, 2021
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 4, 2021
Making sure. |
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 22, 2021
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 22, 2021
|
Nice find. It's a case, but I can't think of how that has a use! |
olsdavis
pushed a commit
to olsdavis/dotty
that referenced
this issue
Apr 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To summarize the discussion in #12261:
There are 3 ways to write catch-all patterns for match types (
case _ =>
,case Any =>
, andcase ? =>
)All of them are already in use in the community build (see
case ? =>
in scodecs)The current syntax is quite inconsistent:
Disallowing those standalone
?
types would be a relative simple change to the parser (5a81d5a / 8968cc1)The text was updated successfully, but these errors were encountered: