You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this when looking into #19122
Should we try to make them consistent so that the macro writer can have an easier life?
show(:(t(abc) = 3).args[2])
quote # In[71], line 1:
3
end
show(:(t(abc)::Int = 3).args[2])
3
This affects @inline, @noinline, etc.
They rely on pushmeta! which expects an Expr instead of Number for the function body.
function pushmeta!(ex::Expr, sym::Symbol, args::Any...)
if isempty(args)
tag = sym
else
tag = Expr(sym, args...)
end
inner = ex
while inner.head == :macrocall
inner = inner.args[end]::Expr
end
idx, exargs = findmeta(inner)
if idx != 0
push!(exargs[idx].args, tag)
else
body::Expr = inner.args[2]
unshift!(body.args, Expr(:meta, tag))
end
ex
end
The text was updated successfully, but these errors were encountered:
I noticed this when looking into #19122
Should we try to make them consistent so that the macro writer can have an easier life?
This affects
@inline, @noinline
, etc.They rely on
pushmeta!
which expects anExpr
instead ofNumber
for the function body.The text was updated successfully, but these errors were encountered: