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

Import renaming does not work for macros #37963

Closed
fredrikekre opened this issue Oct 9, 2020 · 0 comments
Closed

Import renaming does not work for macros #37963

fredrikekre opened this issue Oct 9, 2020 · 0 comments
Assignees

Comments

@fredrikekre
Copy link
Member

fredrikekre commented Oct 9, 2020

Import renaming does not work for macros, but it doesn't error either:

julia> module A
           macro x(y) end
       end
Main.A

julia> import .A: @x as f

julia> f
ERROR: UndefVarError: f not defined

julia> import .A: @x as @f

julia> @f
ERROR: LoadError: UndefVarError: @f not defined
in expression starting at REPL[5]:1

I suggest allowing import A: @x as @f but disallowing import A: @x as f (this is what ImportMacros.jl does).

JeffBezanson added a commit that referenced this issue Oct 9, 2020
also fix import renaming within the same module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants