Skip to content

Commit 8aefd25

Browse files
Only avoid typeassert in combinearg when splatting.
Co-authored-by: Cédric St-Jean <[email protected]>
1 parent f84996f commit 8aefd25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ end
408408
function combinearg(arg_name, arg_type, is_splat, default)
409409
@assert arg_name !== nothing || arg_type !== nothing
410410
a = arg_name===nothing ? :(::$arg_type) :
411-
arg_type==:Any ? arg_name :
411+
arg_type==:Any && is_splat ? arg_name : # see #177 and julia#43625
412412
:($arg_name::$arg_type)
413413
a2 = is_splat ? Expr(:..., a) : a
414414
return default === nothing ? a2 : Expr(:kw, a2, default)

0 commit comments

Comments
 (0)