TypeScript/tests/cases/compiler/widenToAny2.ts

5 lines
134 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
function foo3<T>(x: T[]): T {
return undefined;
}
var z3:number = foo3([undefined, "def"]); // Type is any, but should be string