TypeScript/tests/cases/compiler/widenToAny2.ts
2014-07-12 17:30:19 -07:00

5 lines
134 B
TypeScript

function foo3<T>(x: T[]): T {
return undefined;
}
var z3:number = foo3([undefined, "def"]); // Type is any, but should be string