Skip to content

Commit

Permalink
fix nargs in InferenceState for varargs functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Sep 13, 2016
1 parent ae32538 commit 0c70f14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ type InferenceState
s[1] = Any[ VarState(Bottom, true) for i = 1:nslots ]

atypes = linfo.specTypes
la = toplevel ? 0 : linfo.def.nargs
nargs = toplevel ? 0 : linfo.def.nargs
la = nargs
if la > 0
if linfo.def.isva
if atypes === Tuple
Expand Down Expand Up @@ -156,7 +157,7 @@ type InferenceState
inmodule = toplevel ? current_module() : linfo.def.module # toplevel thunks are inferred in the current module
frame = new(
sp, nl, inmodule, 0,
linfo, src, la, s, Union{}, W, n,
linfo, src, nargs, s, Union{}, W, n,
cur_hand, handler_at, n_handlers,
ssavalue_uses, ssavalue_init,
ObjectIdDict(), #Dict{InferenceState, Vector{LineNum}}(),
Expand Down

0 comments on commit 0c70f14

Please sign in to comment.