Skip to content

Commit 694d7c2

Browse files
author
Kristoffer Carlsson
authored
avoid a runtime dispatch when converting to expr (#257)
1 parent 3490e15 commit 694d7c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/expr.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function is_stringchunk(node)
1111
return k == K"String" || k == K"CmdString"
1212
end
1313

14-
function reorder_parameters!(args, params_pos)
14+
function reorder_parameters!(args::Vector{Any}, params_pos)
1515
p = 0
1616
for i = length(args):-1:1
1717
if !Meta.isexpr(args[i], :parameters)
@@ -24,7 +24,7 @@ function reorder_parameters!(args, params_pos)
2424
end
2525
# nest frankentuples parameters sections
2626
for i = length(args)-1:-1:p
27-
pushfirst!(args[i].args, pop!(args))
27+
pushfirst!((args[i]::Expr).args, pop!(args))
2828
end
2929
# Move parameters to args[params_pos]
3030
insert!(args, params_pos, pop!(args))

0 commit comments

Comments
 (0)