mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 21:07:52 -05:00
Add regression test
This commit is contained in:
13
tests/cases/compiler/unionSignaturesWithThisParameter.ts
Normal file
13
tests/cases/compiler/unionSignaturesWithThisParameter.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// @strict: true
|
||||
|
||||
// Repro from #20802
|
||||
|
||||
function x<T>(ctor: {
|
||||
(this: {}, v: T): void;
|
||||
new(v: T): void;
|
||||
} | {
|
||||
(v: T): void;
|
||||
new(v: T): void;
|
||||
}, t: T) {
|
||||
new ctor(t);
|
||||
}
|
||||
Reference in New Issue
Block a user