-
-
Couldn't load subscription status.
- Fork 81
Open
Description
I ran into some unexpected matching behavior in a function definition (see below). I'm not sure if this should be a match or not. However, if it is a match it seems to by swapping xsym and args (e.g., I would expect xsym to get :x rather than args getting that). I'm guessing this can be worked around by using some of the function definition documentation?
julia> @MacroTools.capture(:(function f(x; n=100) return 1 end), function funsym_(xsym_, args__) body_ end)
true
julia> xsym
:($(Expr(:parameters, :(n=100))))
julia> args
1-element Array{Any,1}:
:xMetadata
Metadata
Assignees
Labels
No labels