-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Difference in parsing x.[y]
to Expr
#396
Comments
Ok, so this is related to the logic at Lines 287 to 289 in acb609d
I think the subtle point here is that the right hand side of julia> y = :a
:a
julia> quote
x.$y
end
quote
#= REPL[33]:2 =#
x.a
end
julia> quote
x.[$y]
end
quote
#= REPL[34]:2 =#
x.:([$(Expr(:$, :y))])
end See? In that second case the However! In current JuliaSyntax julia> JuliaSyntax.enable_in_core!(freeze_world_age=false)
julia> quote
x.[$y]
end
quote
#= REPL[36]:2 =#
x.:([a])
end So while this is a regression, the new behavior is also technically correct, and a bugfix. So we need to decide what to do. |
This syntax was found in the General registry in Accessors.jl and Setfield.jl (the predecessor package of accessors). But in these cases the syntax was only used in a test case for macro error handling - so nobody should be actually using this syntax with those packages. |
Likely due to #325 we have the following difference:
The text was updated successfully, but these errors were encountered: