|
| 1 | +=== tests/cases/compiler/recursiveConditionalCrash4.ts === |
| 2 | +// Repros from #53783 |
| 3 | + |
| 4 | +type LengthDown< |
| 5 | +>LengthDown : Symbol(LengthDown, Decl(recursiveConditionalCrash4.ts, 0, 0)) |
| 6 | + |
| 7 | + Str extends string, |
| 8 | +>Str : Symbol(Str, Decl(recursiveConditionalCrash4.ts, 2, 16)) |
| 9 | + |
| 10 | + Length extends number | bigint, |
| 11 | +>Length : Symbol(Length, Decl(recursiveConditionalCrash4.ts, 3, 21)) |
| 12 | + |
| 13 | + It |
| 14 | +>It : Symbol(It, Decl(recursiveConditionalCrash4.ts, 4, 33)) |
| 15 | + |
| 16 | +> = It extends StrIter.Iterator |
| 17 | +>It : Symbol(It, Decl(recursiveConditionalCrash4.ts, 4, 33)) |
| 18 | +>StrIter : Symbol(StrIter) |
| 19 | +>Iterator : Symbol(StrIter.Iterator) |
| 20 | + |
| 21 | + ? StrIter.CutAt<Str, It> extends `${infer $Rest}` |
| 22 | +>StrIter : Symbol(StrIter) |
| 23 | +>CutAt : Symbol(StrIter.CutAt) |
| 24 | +>Str : Symbol(Str, Decl(recursiveConditionalCrash4.ts, 2, 16)) |
| 25 | +>It : Symbol(It, Decl(recursiveConditionalCrash4.ts, 4, 33)) |
| 26 | +>$Rest : Symbol($Rest, Decl(recursiveConditionalCrash4.ts, 7, 43)) |
| 27 | + |
| 28 | + ? LengthDown<$Rest, Add<Length, StrIter.Value<It>>, It> |
| 29 | +>LengthDown : Symbol(LengthDown, Decl(recursiveConditionalCrash4.ts, 0, 0)) |
| 30 | +>$Rest : Symbol($Rest, Decl(recursiveConditionalCrash4.ts, 7, 43)) |
| 31 | +>Add : Symbol(Add) |
| 32 | +>Length : Symbol(Length, Decl(recursiveConditionalCrash4.ts, 3, 21)) |
| 33 | +>StrIter : Symbol(StrIter) |
| 34 | +>Value : Symbol(StrIter.Value) |
| 35 | +>It : Symbol(It, Decl(recursiveConditionalCrash4.ts, 4, 33)) |
| 36 | +>It : Symbol(It, Decl(recursiveConditionalCrash4.ts, 4, 33)) |
| 37 | + |
| 38 | + : LengthDown<Str, Length, StrIter.Prev<It>> |
| 39 | +>LengthDown : Symbol(LengthDown, Decl(recursiveConditionalCrash4.ts, 0, 0)) |
| 40 | +>Str : Symbol(Str, Decl(recursiveConditionalCrash4.ts, 2, 16)) |
| 41 | +>Length : Symbol(Length, Decl(recursiveConditionalCrash4.ts, 3, 21)) |
| 42 | +>StrIter : Symbol(StrIter) |
| 43 | +>Prev : Symbol(StrIter.Prev) |
| 44 | +>It : Symbol(It, Decl(recursiveConditionalCrash4.ts, 4, 33)) |
| 45 | + |
| 46 | + : Length; |
| 47 | +>Length : Symbol(Length, Decl(recursiveConditionalCrash4.ts, 3, 21)) |
| 48 | + |
| 49 | +type Foo<T> = T extends unknown |
| 50 | +>Foo : Symbol(Foo, Decl(recursiveConditionalCrash4.ts, 10, 11)) |
| 51 | +>T : Symbol(T, Decl(recursiveConditionalCrash4.ts, 12, 9)) |
| 52 | +>T : Symbol(T, Decl(recursiveConditionalCrash4.ts, 12, 9)) |
| 53 | + |
| 54 | + ? unknown extends `${infer $Rest}` |
| 55 | +>$Rest : Symbol($Rest, Decl(recursiveConditionalCrash4.ts, 13, 28)) |
| 56 | + |
| 57 | + ? Foo<T> |
| 58 | +>Foo : Symbol(Foo, Decl(recursiveConditionalCrash4.ts, 10, 11)) |
| 59 | +>T : Symbol(T, Decl(recursiveConditionalCrash4.ts, 12, 9)) |
| 60 | + |
| 61 | + : Foo<unknown> |
| 62 | +>Foo : Symbol(Foo, Decl(recursiveConditionalCrash4.ts, 10, 11)) |
| 63 | + |
| 64 | + : unknown; |
| 65 | + |
0 commit comments