Skip to content
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

Fix escaping of rhs for @atomic a.x = y #41216

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

tkf
Copy link
Member

@tkf tkf commented Jun 13, 2021

This PR fixes escaping of atomic setproperty! syntax @atomic a.x = y. Before this PR:

julia> mutable struct A
           @atomic x::Int
       end

julia> f!(a, y) = @atomic a.x = y;

julia> f!(A(0), 1)
ERROR: UndefVarError: y not defined

@tkf tkf requested a review from vtjnash June 13, 2021 22:21
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks like I got all the other cases?

@vtjnash vtjnash merged commit 82ae530 into JuliaLang:master Jun 14, 2021
@tkf tkf deleted the at-atomic-setproperty branch June 14, 2021 03:54
@tkf
Copy link
Member Author

tkf commented Jun 14, 2021

Yeah, I eyeballed other cases but couldn't find anything similar.

KristofferC pushed a commit that referenced this pull request Jun 17, 2021
@KristofferC KristofferC mentioned this pull request Jun 17, 2021
20 tasks
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants