|
| 1 | +=== tests/cases/compiler/circularInlineMappedGenericTupleTypeNoCrash.ts === |
| 2 | +class Foo<Elements extends readonly unknown[]> { |
| 3 | +>Foo : Symbol(Foo, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 0)) |
| 4 | +>Elements : Symbol(Elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 10)) |
| 5 | + |
| 6 | + public readonly elements: { [P in keyof Elements]: { bar: Elements[P] } }; |
| 7 | +>elements : Symbol(Foo.elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 48)) |
| 8 | +>P : Symbol(P, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 1, 31)) |
| 9 | +>Elements : Symbol(Elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 10)) |
| 10 | +>bar : Symbol(bar, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 1, 54)) |
| 11 | +>Elements : Symbol(Elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 10)) |
| 12 | +>P : Symbol(P, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 1, 31)) |
| 13 | + |
| 14 | + public constructor( |
| 15 | + ...elements: { [P in keyof Elements]: { bar: Elements[P] } } |
| 16 | +>elements : Symbol(elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 3, 21)) |
| 17 | +>P : Symbol(P, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 4, 20)) |
| 18 | +>Elements : Symbol(Elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 10)) |
| 19 | +>bar : Symbol(bar, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 4, 43)) |
| 20 | +>Elements : Symbol(Elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 10)) |
| 21 | +>P : Symbol(P, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 4, 20)) |
| 22 | + |
| 23 | + ) { |
| 24 | + this.elements = elements; |
| 25 | +>this.elements : Symbol(Foo.elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 48)) |
| 26 | +>this : Symbol(Foo, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 0)) |
| 27 | +>elements : Symbol(Foo.elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 48)) |
| 28 | +>elements : Symbol(elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 3, 21)) |
| 29 | + } |
| 30 | + |
| 31 | + public add(): Foo<[...Elements, "abc"]> { |
| 32 | +>add : Symbol(Foo.add, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 7, 3)) |
| 33 | +>Foo : Symbol(Foo, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 0)) |
| 34 | +>Elements : Symbol(Elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 10)) |
| 35 | + |
| 36 | + return new Foo<[...Elements, "abc"]>(...this.elements, { bar: "abc" }); |
| 37 | +>Foo : Symbol(Foo, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 0)) |
| 38 | +>Elements : Symbol(Elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 10)) |
| 39 | +>this.elements : Symbol(Foo.elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 48)) |
| 40 | +>this : Symbol(Foo, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 0)) |
| 41 | +>elements : Symbol(Foo.elements, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 0, 48)) |
| 42 | +>bar : Symbol(bar, Decl(circularInlineMappedGenericTupleTypeNoCrash.ts, 10, 60)) |
| 43 | + } |
| 44 | +} |
| 45 | + |
0 commit comments