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

2 lines
159 B
TypeScript

function f<T>(a: T): T { } // error, no return statement
function f2<T>(a: T): T { return T; } // bug was that this satisfied the return statement requirement