Open
Description
julia> f(x=1, args...) = (x, args...) # works as expected
f (generic function with 2 methods)
julia> g(x=1, args::Vararg) = (x, args...)
ERROR: syntax: optional positional arguments must occur at end around REPL[17]:1
Stacktrace:
[1] top-level scope
@ REPL[17]:1
It would be great if the latter form worked, as Vararg
allows more flexible type constraints and specializations than ...
, including working around avoided specialization as per https://docs.julialang.org/en/v1/manual/performance-tips/#Be-aware-of-when-Julia-avoids-specializing