File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -20366,12 +20366,14 @@ namespace ts {
2036620366 let lastTypeId = 0;
2036720367 for (let i = 0; i < depth; i++) {
2036820368 const t = stack[i];
20369- // We only count occurrences with higher type ids than the previous occurrences, since higher
20370- // type ids are an indicator of newer instantiations caused by recursion.
20371- if (getRecursionIdentity(t) === identity && t.id >= lastTypeId) {
20372- count++;
20373- if (count >= maxDepth) {
20374- return true;
20369+ if (getRecursionIdentity(t) === identity) {
20370+ // We only count occurrences with a higher type id than the previous occurrence, since higher
20371+ // type ids are an indicator of newer instantiations caused by recursion.
20372+ if (t.id >= lastTypeId) {
20373+ count++;
20374+ if (count >= maxDepth) {
20375+ return true;
20376+ }
2037520377 }
2037620378 lastTypeId = t.id;
2037720379 }
You can’t perform that action at this time.
0 commit comments