We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a8adb5 commit fb6699dCopy full SHA for fb6699d
src/utilities.jl
@@ -449,9 +449,18 @@ args = arguments(first(methods(f)))
449
```
450
"""
451
function arguments(m::Method)
452
- local template = get_method_source(m)
453
- if isdefined(template, :slotnames)
454
- local args = map(template.slotnames[1:nargs(m)]) do arg
+ local argnames = nothing
+ if isdefined(m, :generator)
+ # Generated function.
455
+ argnames = m.generator.argnames
456
+ else
457
+ local template = get_method_source(m)
458
+ if isdefined(template, :slotnames)
459
+ argnames = template.slotnames
460
+ end
461
462
+ if !isnothing(argnames)
463
+ local args = map(argnames) do arg
464
arg === Symbol("#unused#") ? "_" : arg
465
end
466
return filter(arg -> arg !== Symbol("#self#"), args)
0 commit comments