Skip to content

Commit

Permalink
Fuse in_union
Browse files Browse the repository at this point in the history
  • Loading branch information
N5N3 committed Aug 10, 2022
1 parent bfcd2ce commit 81a7ee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/subtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ static int subtype(jl_value_t *x, jl_value_t *y, jl_stenv_t *e, int param)
x = pick_union_element(x, e, 0);
}
if (jl_is_uniontype(y)) {
if (x == ((jl_uniontype_t*)y)->a || x == ((jl_uniontype_t*)y)->b)
if (in_union(y, x))
return 1;
if (jl_is_unionall(x))
return subtype_unionall(y, (jl_unionall_t*)x, e, 0, param);
Expand Down

0 comments on commit 81a7ee2

Please sign in to comment.