mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Add regression test
This commit is contained in:
@@ -99,3 +99,25 @@ function func2(inst: Instance) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #29106
|
||||
|
||||
const f = (_a: string, _b: string): void => {};
|
||||
|
||||
interface A {
|
||||
a?: string;
|
||||
b?: string;
|
||||
}
|
||||
|
||||
interface B {
|
||||
a: string;
|
||||
b: string;
|
||||
}
|
||||
|
||||
type U = A | B;
|
||||
|
||||
const u: U = {} as any;
|
||||
|
||||
u.a && u.b && f(u.a, u.b);
|
||||
|
||||
u.b && u.a && f(u.a, u.b);
|
||||
|
||||
Reference in New Issue
Block a user