Skip to content

Commit

Permalink
gf: remove unnecessary assert cycle==depth
Browse files Browse the repository at this point in the history
We do not care about this condition (the point of this fast path is to
skip checking it).

Fix #50450
  • Loading branch information
vtjnash committed Jul 13, 2023
1 parent dcca46b commit 15bcf1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3426,7 +3426,9 @@ static int sort_mlmatches(jl_array_t *t, size_t idx, arraylist_t *visited, array
}
}
if ((size_t)visited->items[idx] == 1) {
assert(cycle == depth);
// n.b. cycle might be < depth, if we had a cycle with a child
// idx, but since we are on the top of the stack, nobody
// observed that and so we are content to ignore this
size_t childidx = (size_t)arraylist_pop(stack);
assert(childidx == idx); (void)childidx;
assert(!subt || *found_minmax == 2);
Expand Down

0 comments on commit 15bcf1b

Please sign in to comment.