Skip to content

Commit

Permalink
Fix nth_methtable tparam of -1 when n==0 (#47666)
Browse files Browse the repository at this point in the history
Fixes #47625

(cherry picked from commit 3f9409c)
  • Loading branch information
apaz-cli authored and KristofferC committed Dec 8, 2022
1 parent 9b9a703 commit 1b85c1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/method.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ static jl_methtable_t *nth_methtable(jl_value_t *a JL_PROPAGATES_ROOT, int n) JL
if (mt != NULL)
return mt;
}
if (jl_is_tuple_type(a)) {
else if (jl_is_tuple_type(a)) {
if (jl_nparams(a) >= n)
return nth_methtable(jl_tparam(a, n - 1), 0);
}
Expand Down

0 comments on commit 1b85c1f

Please sign in to comment.