Skip to content

Macro hygiene broken for interpolation into quoted expressions #37540

Closed
@simeonschaub

Description

@simeonschaub

MWE:

julia> macro foo()
           quote
               x = 1
               :($x)
           end
       end
@foo (macro with 1 method)

julia> @macroexpand @foo
quote
    #= REPL[40]:3 =#
    var"#58#x" = 1
    #= REPL[40]:4 =#
    x
end

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions