Skip to content

Commit 7662661

Browse files
authored
gf: remove unnecessary assert cycle==depth (#50542)
We do not care about this condition (the point of this fast path is to skip checking it). Fix #50450
2 parents fabc519 + 15bcf1b commit 7662661

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3426,7 +3426,9 @@ static int sort_mlmatches(jl_array_t *t, size_t idx, arraylist_t *visited, array
34263426
}
34273427
}
34283428
if ((size_t)visited->items[idx] == 1) {
3429-
assert(cycle == depth);
3429+
// n.b. cycle might be < depth, if we had a cycle with a child
3430+
// idx, but since we are on the top of the stack, nobody
3431+
// observed that and so we are content to ignore this
34303432
size_t childidx = (size_t)arraylist_pop(stack);
34313433
assert(childidx == idx); (void)childidx;
34323434
assert(!subt || *found_minmax == 2);

0 commit comments

Comments
 (0)