Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro hygiene broken for interpolation into quoted expressions #37540

Closed
simeonschaub opened this issue Sep 12, 2020 · 1 comment
Closed

Macro hygiene broken for interpolation into quoted expressions #37540

simeonschaub opened this issue Sep 12, 2020 · 1 comment
Assignees
Labels
macros @macros

Comments

@simeonschaub
Copy link
Member

simeonschaub commented Sep 12, 2020

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
@simeonschaub simeonschaub changed the title Macro hygiene broken for interpolation Macro hygiene broken for interpolation into quoted expressions Sep 12, 2020
@JeffBezanson JeffBezanson self-assigned this Sep 12, 2020
@JeffBezanson JeffBezanson added the macros @macros label Sep 12, 2020
@vtjnash
Copy link
Member

vtjnash commented Sep 15, 2020

This was intentional at the time (7ec9b18#diff-c4aa3af56687ca52d73d3de5e0734726R494-R495), but I definitely didn't realize how little it would break to fix it

ViralBShah added a commit that referenced this issue Nov 10, 2020
There's also a bunch of issue links that are missing (#37410, #37247, #37540, #37973, #37461, #37753) but it seems there's a script that generates the links so I'm assuming that will be fixed automatically.

Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
achuchmala pushed a commit to achuchmala/julia that referenced this issue Nov 11, 2020
There's also a bunch of issue links that are missing (JuliaLang#37410, JuliaLang#37247, JuliaLang#37540, JuliaLang#37973, JuliaLang#37461, JuliaLang#37753) but it seems there's a script that generates the links so I'm assuming that will be fixed automatically.

Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macros @macros
Projects
None yet
Development

No branches or pull requests

3 participants