Closed
Description
MWE in 1.10:
julia> macro foo()
return :($ref1[] = 1; nothing)
end
@foo (macro with 1 method)
julia> ref1 = Ref{Int}()
Base.RefValue{Int64}(140632197190944)
julia> bar() = (@foo; nothing)
bar (generic function with 1 method)
julia> bar()
julia> ref1
Base.RefValue{Int64}(140632197190944)
julia> @foo
julia> ref1
Base.RefValue{Int64}(1)
Correct output in 1.9:
julia> macro foo()
return :($ref1[] = 1; nothing)
end
@foo (macro with 1 method)
julia> ref1 = Ref{Int}()
Base.RefValue{Int64}(140223960686096)
julia> bar() = (@foo; nothing)
bar (generic function with 1 method)
julia> bar()
julia> ref1
Base.RefValue{Int64}(1)
julia> @foo
julia> ref1
Base.RefValue{Int64}(1)
Appears to be another variant of #52531