macro mm(T)
quote
macro kk()
:(println("A")) |> esc
end
@kk
end |> esc
end
julia> @macroexpand @mm Int
ERROR: LoadError: UndefVarError: @kk not defined
Stacktrace:
[1] top-level scope
[2] #macroexpand#32 at ./expr.jl:107 [inlined]
[3] (::getfield(Base, Symbol(“#kw##macroexpand”)))(::NamedTuple{(:recursive,),Tuple{Bool}}, ::typeof(macroexpand), ::Module, ::Expr) at ./none:0
[4] top-level scope at REPL[11]:1
in expression starting at REPL[10]:6