module Foo
x = 1
end
@eval Foo begin
macro m(y) y end
@m(x)
end
ERROR: LoadError: LoadError: UndefVarError: @m not defined
I thought this would define the @m
macro in the Foo
module, and then be able to access it. What is happening and how do I fix it?