Add regression test

This commit is contained in:
Anders Hejlsberg
2018-12-20 07:21:49 -08:00
parent 93acaac087
commit 3e93461fc8

View File

@@ -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);