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

Logging macros not hygienic #26273

Closed
Keno opened this issue Mar 1, 2018 · 0 comments
Closed

Logging macros not hygienic #26273

Keno opened this issue Mar 1, 2018 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior logging The logging framework

Comments

@Keno
Copy link
Member

Keno commented Mar 1, 2018

julia> baremodule foo
       import Base
       @Base.error "Hello"
       end
WARNING: replacing module foo.
ERROR: UndefVarError: getindex not defined
Stacktrace:
 [1] top-level scope at logging.jl:300

It's trying to use a getindex function from my module, rather than the one from Base.

@stevengj stevengj added bug Indicates an unexpected problem or unintended behavior logging The logging framework labels Mar 1, 2018
Keno added a commit that referenced this issue Mar 1, 2018
Macro hygiene sees pre-lowered forms, and as a result does not apply
to syntactic forms like []. Use an explicit `getindex` to get the
proper hygiene behavior.

Fixes #26273
JeffBezanson pushed a commit that referenced this issue Mar 2, 2018
Macro hygiene sees pre-lowered forms, and as a result does not apply
to syntactic forms like []. Use an explicit `getindex` to get the
proper hygiene behavior.

Fixes #26273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior logging The logging framework
Projects
None yet
Development

No branches or pull requests

2 participants