Closed
Description
TypeScript Version: 2.3.2
Code
function test(a: "A"): any;
function test(b: "B"): any;
function test(ab: "A"|"B"): any { }
declare var u: "A"|"B";
test(u);
Expected behavior: No error
Actual behavior: Argument of type "A"|"B" is not assignable to type "B"
Ideally, TypeScript should detect that there is an overload for each variant of the union type and thus accept the union type as an argument.