No comment on what I was trying to do, but this error message is confusing, as it suggests you to write exactly what you already wrote, even though it is illegal syntax:
julia> dump(:(@(MyMacro{T}) expr))
ERROR: syntax: invalid macro use "@(MyMacro{T})"
It is not saying invalid macro, use "@(MyMacro{T})"
, but that difference is pretty subtle...
Panda: eats, shoots, and leaves ... duh!
At first I wrote it without the parentheses:
julia> dump(:(@MyMacro{T} expr))
ERROR: syntax: invalid macro use "@(MyMacro{T})"
and so I naively thought the error message told me to add parentheses around it. I guess if I'm the only one who gets confused by this, it's alright, but maybe a near-synonym of "use" could be used in this context like invalid macro call
or invalid macro name
?
Yes we can change it to invalid macro call
.
invalid macro, call ...
can we have something that does not end with an imperative?
julia> @Jeff{Bezanson}
ERROR: syntax: invalid macro call "@Jeff{Bezanson}"
I agree. Is invalid macro name
, invalid macro statement
, or invalid macro usage
better?
invalid macro usage
seems good to me. I'm also happy with deferring to calling Jeff but then his phone number should be in there too.
+1 for macro usage
, -1 for including my phone number :)
Most helpful comment
Panda: eats, shoots, and leaves ... duh!
At first I wrote it without the parentheses:
and so I naively thought the error message told me to add parentheses around it. I guess if I'm the only one who gets confused by this, it's alright, but maybe a near-synonym of "use" could be used in this context like
invalid macro call
orinvalid macro name
?