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

atomics: fix some minor issues #42335

Merged
merged 1 commit into from
Sep 22, 2021
Merged

atomics: fix some minor issues #42335

merged 1 commit into from
Sep 22, 2021

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Sep 21, 2021

No description provided.

@vtjnash vtjnash requested a review from tkf September 21, 2021 21:58
emit_typecheck(ctx, ret, jltype, fname + "typed_store");
emit_typecheck(ctx, ret, jltype, fname);
Copy link
Member

Choose a reason for hiding this comment

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

So this fixes the error message

julia> mutable struct AtomicRef{T}
           @atomic value::T
       end

julia> function f!(r)
           + = (_, x) -> x
           @atomic r.value += :a
       end;

julia> f!(r)
ERROR: TypeError: in modifyfield!typed_store, expected Int64, got a value of type Symbol

to TypeError: in modifyfield!, expected Int64...? Sounds like an improvement to me!

@vtjnash vtjnash merged commit 1e6c269 into master Sep 22, 2021
@vtjnash vtjnash deleted the jn/atomic-minor-fix branch September 22, 2021 15:24
KristofferC pushed a commit that referenced this pull request Sep 23, 2021
KristofferC pushed a commit that referenced this pull request Sep 28, 2021
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
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