2014-07-13 01:04:16 +02:00
|
|
|
//// [returnTypeParameter.ts]
|
|
|
|
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
|
|
|
|
|
|
|
|
//// [returnTypeParameter.js]
|
2015-03-26 21:46:35 +01:00
|
|
|
function f(a) { } // error, no return statement
|
|
|
|
function f2(a) { return T; } // bug was that this satisfied the return statement requirement
|