TypeScript/tests/cases/compiler/undefinedInferentialTyping.ts

5 lines
101 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
function f<T>(arr: T[], elemnt: T): T {
return null;
}
var a = f([], 3); // should be number