Can someone resolve this macro error I'm having, it only started happening in version 0.6:
mutable struct Foo
x::Int
end
macro test(myfoo)
quoteblock =
quote
myfoo.x += 1
end
return quoteblock
end
function func(myfoo)
@test myfoo
println(myfoo.x)
end
foo = Foo(3)
func(foo)
In theory this should just replace the line @test myfoo
in the function func
with myfoo.x += 1
at compile time, which should work, but instead I get the error:
UndefVarError: myfoo not defined