Skip to content

Commit 84bd33f

Browse files
committed
Fix Core._apply
1 parent dc77b19 commit 84bd33f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/builtins.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
5252
return Some{Any}(===(getargs(args, frame)...))
5353
end
5454
elseif f === Core._apply
55-
args = getargs(args, frame)
55+
argswrapped = getargs(args, frame)
5656
if !expand
57-
return Some{Any}(Core._apply(args...))
57+
return Some{Any}(Core._apply(argswrapped...))
5858
end
59-
new_expr = Expr(:call, args[1])
60-
popfirst!(args)
61-
for x in args
59+
new_expr = Expr(:call, argswrapped[1])
60+
popfirst!(argswrapped)
61+
argsflat = append_any(argswrapped...)
62+
for x in argsflat
6263
push!(new_expr.args, (isa(x, Symbol) || isa(x, Expr) || isa(x, QuoteNode)) ? QuoteNode(x) : x)
6364
end
6465
return new_expr

0 commit comments

Comments
 (0)