-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviormacros@macros@macros
Description
When I try to define an empty generic function from within a macro using an escaped name I get a 'malformed expression' error. Doing exactly the same thing but with a function with an empty argument list works.
julia> macro Bla()
fname = :myfun
:(function $(esc(fname)) end)
end
@Bla (macro with 1 method)
julia> @Bla
ERROR: syntax: malformed expression
Stacktrace:
[1] top-level scope at REPL[8]:1
julia> macro Bla()
fname = :myfun
:(function $(esc(fname))() end)
end
@Bla (macro with 1 method)
julia> @Bla
myfun (generic function with 1 method)Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviormacros@macros@macros