Closed
Description
declare function f<T extends Number>(x: T): T;
declare function f<T extends String>(x: T): T
var v = f<string>("");
Expected: The second overload gets picked and there is no error.
Actual: An error:
error TS2343: Type 'string' does not satisfy the constraint 'Number':
Property 'toFixed' is missing in type 'String'.