diff --git a/tests/cases/compiler/unionSignaturesWithThisParameter.ts b/tests/cases/compiler/unionSignaturesWithThisParameter.ts new file mode 100644 index 00000000000..c983ff1a99c --- /dev/null +++ b/tests/cases/compiler/unionSignaturesWithThisParameter.ts @@ -0,0 +1,13 @@ +// @strict: true + +// Repro from #20802 + +function x(ctor: { + (this: {}, v: T): void; + new(v: T): void; +} | { + (v: T): void; + new(v: T): void; +}, t: T) { + new ctor(t); +}