Skip to content

Commit b18f68b

Browse files
committed
workaround for #40048, stack overflow in type intersection
1 parent 8535b8c commit b18f68b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,8 @@ static int jl_type_intersection2(jl_value_t *t1, jl_value_t *t2, jl_value_t **is
15971597
*isect = jl_type_intersection_env_s(t1, t2, NULL, &is_subty);
15981598
if (*isect == jl_bottom_type)
15991599
return 0;
1600+
// TODO: This extra call to intersection sometimes hits bad cases, e.g. issue #40048.
1601+
/*
16001602
if (is_subty)
16011603
return 1;
16021604
// TODO: sometimes type intersection returns types with free variables
@@ -1613,6 +1615,7 @@ static int jl_type_intersection2(jl_value_t *t1, jl_value_t *t2, jl_value_t **is
16131615
if (jl_types_egal(*isect2, *isect)) {
16141616
*isect2 = NULL;
16151617
}
1618+
*/
16161619
return 1;
16171620
}
16181621

0 commit comments

Comments
 (0)