- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
property destructuring doesn't allow lhs-type-declaration #39374
Labels
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
Comments
Yes, I think we can just allow that one. |
I guess the only concern would be that if used in a function declaration, people might assume that this type annotations could be used for dispatch as well. |
We can just throw that case, as we do for tuple destructuring ? julia> function foo((a::Int, b::Int))
a + b
end
ERROR: syntax: invalid argument destructuring syntax "(a::Int, b::Int)"
Stacktrace:
[1] top-level scope
@ none:1 |
Ah, that's true. |
simeonschaub
added a commit
that referenced
this issue
Feb 19, 2021
ElOceanografo
pushed a commit
to ElOceanografo/julia
that referenced
this issue
May 4, 2021
antoine-levitt
pushed a commit
to antoine-levitt/julia
that referenced
this issue
May 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#39285 implements the property destructuring syntax, but it doesn't allows us to declare types of destructured locals.
Can this be fixed ?
/cc @simeonschaub
The text was updated successfully, but these errors were encountered: