Skip to content

Commit 31969bf

Browse files
committed
fix call args inlining length bug
1 parent 5b91981 commit 31969bf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

base/inference.jl

+8
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,15 @@ function inlineable(f, e::Expr, atypes, sv, enclosing_ast)
21242124
argexprs = {argexprs[1:(na-1)]..., vararg}
21252125
isva = true
21262126
end
2127+
elseif na != length(argexprs)
2128+
# we have a method match only because an earlier
2129+
# inference step shortened our call args list, even
2130+
# though we have too many arguments to actually
2131+
# call this function
2132+
@assert isvarargtype(atypes[na])
2133+
return NF
21272134
end
2135+
21282136
@assert na == length(argexprs)
21292137

21302138
if needcopy

0 commit comments

Comments
 (0)