Skip to content

Commit 3f9409c

Browse files
authored
Fix nth_methtable tparam of -1 when n==0 (#47666)
Fixes #47625
1 parent c8ea33d commit 3f9409c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/method.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ static jl_methtable_t *nth_methtable(jl_value_t *a JL_PROPAGATES_ROOT, int n) JL
911911
if (mt != NULL)
912912
return mt;
913913
}
914-
if (jl_is_tuple_type(a)) {
914+
else if (jl_is_tuple_type(a)) {
915915
if (jl_nparams(a) >= n)
916916
return nth_methtable(jl_tparam(a, n - 1), 0);
917917
}

0 commit comments

Comments
 (0)