-
Notifications
You must be signed in to change notification settings - Fork 4.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
Proposal: Lambda Wildcards #15027
Comments
It is alerady included in #14794, see end of 'Wildcards (revisited)' section |
I believe that #14862 would supersede that behavior and that wildcards wouldn't just result by attempting to declare multiple variables of the name However, if those proposals combined (and implemented) still results in wildcards for lambda declarations then I will close this proposal. |
Rereading #14794 it does appear to cover this. |
This is an extension to #14862 and #14794.
I propose that when a lambda is declared using multiple
_
identifiers for parameter names that all of those identifiers are then considered wildcards and attempting to reference those parameters in the lambda body is a compiler error. However, if there is only a single parameter with that name then it may be referenced in the lambda body to retain backwards compatibility.The text was updated successfully, but these errors were encountered: