Skip to content

Commit 6d5ec2d

Browse files
committed
Fuse in_union
1 parent 460bf2b commit 6d5ec2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/subtype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ static int subtype(jl_value_t *x, jl_value_t *y, jl_stenv_t *e, int param)
11721172
x = pick_union_element(x, e, 0);
11731173
}
11741174
if (jl_is_uniontype(y)) {
1175-
if (x == ((jl_uniontype_t*)y)->a || x == ((jl_uniontype_t*)y)->b)
1175+
if (in_union(y, x))
11761176
return 1;
11771177
if (jl_is_unionall(x))
11781178
return subtype_unionall(y, (jl_unionall_t*)x, e, 0, param);

0 commit comments

Comments
 (0)