|
| 1 | +=== tests/cases/compiler/unionSignaturesWithThisParameter.ts === |
| 2 | +// Repro from #20802 |
| 3 | + |
| 4 | +function x<T>(ctor: { |
| 5 | +>x : Symbol(x, Decl(unionSignaturesWithThisParameter.ts, 0, 0)) |
| 6 | +>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11)) |
| 7 | +>ctor : Symbol(ctor, Decl(unionSignaturesWithThisParameter.ts, 2, 14)) |
| 8 | + |
| 9 | + (this: {}, v: T): void; |
| 10 | +>this : Symbol(this, Decl(unionSignaturesWithThisParameter.ts, 3, 5)) |
| 11 | +>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 3, 14)) |
| 12 | +>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11)) |
| 13 | + |
| 14 | + new(v: T): void; |
| 15 | +>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 4, 8)) |
| 16 | +>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11)) |
| 17 | + |
| 18 | +} | { |
| 19 | + (v: T): void; |
| 20 | +>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 6, 5)) |
| 21 | +>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11)) |
| 22 | + |
| 23 | + new(v: T): void; |
| 24 | +>v : Symbol(v, Decl(unionSignaturesWithThisParameter.ts, 7, 8)) |
| 25 | +>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11)) |
| 26 | + |
| 27 | +}, t: T) { |
| 28 | +>t : Symbol(t, Decl(unionSignaturesWithThisParameter.ts, 8, 2)) |
| 29 | +>T : Symbol(T, Decl(unionSignaturesWithThisParameter.ts, 2, 11)) |
| 30 | + |
| 31 | + new ctor(t); |
| 32 | +>ctor : Symbol(ctor, Decl(unionSignaturesWithThisParameter.ts, 2, 14)) |
| 33 | +>t : Symbol(t, Decl(unionSignaturesWithThisParameter.ts, 8, 2)) |
| 34 | +} |
| 35 | + |
0 commit comments