Skip to content

Commit

Permalink
remove old type intersection code
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
JeffBezanson committed Nov 7, 2016
1 parent 8cea777 commit 737682d
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 1,775 deletions.
8 changes: 4 additions & 4 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,16 +898,16 @@ static int check_ambiguous_visitor(jl_typemap_entry_t *oldentry, struct typemap_
// we're ok if the new definition is actually the one we just
// inferred to be required (see issue #3609). ideally this would
// never happen, since if New ⊓ Old == New then we should have
// considered New more specific, but jl_args_morespecific is not
// considered New more specific, but jl_type_morespecific is not
// perfect, so this is a useful fallback.
return 1;
}

// we know type ∩ sig != Union{} and
// we know !jl_args_morespecific(type, sig) [before]
// or !jl_args_morespecific(sig, type) [after]
// we know !jl_type_morespecific(type, sig) [before]
// or !jl_type_morespecific(sig, type) [after]
// now we are checking that the reverse is true
if (!jl_args_morespecific((jl_value_t*)(closure->after ? type : sig),
if (!jl_type_morespecific((jl_value_t*)(closure->after ? type : sig),
(jl_value_t*)(closure->after ? sig : type))) {
jl_typemap_entry_t *l = jl_typemap_assoc_by_type(map, (jl_tupletype_t*)isect, NULL, 0, 0, 0);
if (l != NULL) // ok, intersection is covered
Expand Down
Loading

0 comments on commit 737682d

Please sign in to comment.