Skip to content

macros should be scoped like functions #339

@StefanKarpinski

Description

@StefanKarpinski
julia> let x = 1
         macro foo(v)
           :($v+1)
         end
         @foo x
       end
syntax error: macro foo not defined
in run_repl, /Users/stefan/projects/julia/j/client.j:22
in _start, /Users/stefan/projects/julia/j/client.j:134

Ideally, the macro @foo would exist only within the scope of the let block.

Metadata

Metadata

Assignees

Labels

breakingThis change will break code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions