Skip to content

fix #33337 by reverting part of #32776 that changed method matching #33345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,6 @@ static int ml_matches_visitor(jl_typemap_entry_t *ml, struct typemap_intersectio
int i;
for (i = 0; i < len; i++) {
jl_method_t *prior_match = (jl_method_t*)jl_svecref(jl_array_ptr_ref(closure->t, i), 2);
jl_value_t *sig2 = (jl_value_t*)prior_match->sig;
if (closure->include_ambiguous && (jl_value_t*)meth->ambig != jl_nothing) {
// check that prior sig is not actually just ambiguous with this--may need to include both
size_t j, l = jl_array_len(meth->ambig);
Expand All @@ -2628,7 +2627,9 @@ static int ml_matches_visitor(jl_typemap_entry_t *ml, struct typemap_intersectio
if (j != l)
continue; // still include this match
}
if (jl_subtype(closure->match.ti, sig2)) {
jl_value_t *prior_ti = jl_svecref(jl_array_ptr_ref(closure->t, i), 0);
if (jl_is_datatype(prior_ti) && ((jl_datatype_t*)prior_ti)->isdispatchtuple &&
jl_subtype(closure->match.ti, prior_ti)) {
return_this_match = 0;
break;
}
Expand Down