Skip to content

Commit ece9076

Browse files
committed
If we are splitting args in a function call, we cannot assume that these fields are Symbols. They might be expressions.
1 parent 732cf05 commit ece9076

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ function splitarg(arg_expr)
304304
splitvar(arg) =
305305
@match arg begin
306306
::T_ => (nothing, T)
307-
name_::T_ => (name::Symbol, T)
308-
x_ => (x::Symbol, :Any)
307+
name_::T_ => (name, T)
308+
x_ => (x, :Any)
309309
end
310310
(is_splat = @capture(arg_expr, arg_expr2_...)) || (arg_expr2 = arg_expr)
311311
if @capture(arg_expr2, arg_ = default_)

0 commit comments

Comments
 (0)