Skip to content

Commit

Permalink
fix error for assignment to global of wrong type (JuliaLang#44183)
Browse files Browse the repository at this point in the history
Accidentally missed this in JuliaLang#43671
  • Loading branch information
simeonschaub authored and LilithHafner committed Feb 22, 2022
1 parent 386d229 commit 18c7dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ JL_DLLEXPORT void jl_checked_assignment(jl_binding_t *b, jl_value_t *rhs)
{
jl_value_t *old_ty = NULL;
if (!jl_atomic_cmpswap_relaxed(&b->ty, &old_ty, (jl_value_t*)jl_any_type) && !jl_isa(rhs, old_ty)) {
jl_errorf("cannot set type for global %s. It already has a value of a different type.",
jl_errorf("cannot assign an incompatible value to the global %s.",
jl_symbol_name(b->name));
}
if (b->constp) {
Expand Down

0 comments on commit 18c7dcf

Please sign in to comment.