TypeScript/tests/baselines/reference/typeArgumentsInFunctionExpressions.types
2014-08-15 14:37:48 -07:00

44 lines
643 B
Plaintext

=== tests/cases/compiler/typeArgumentsInFunctionExpressions.ts ===
var obj = function f<T>(a: T) { // should not error
>obj : <T>(a: T) => T
>function f<T>(a: T) { // should not error
var x: T;
return a;
} : <T>(a: T) => T
>f : <T>(a: T) => T
>T : T
>a : T
>T : T
var x: T;
>x : T
>T : T
return a;
>a : T
};
var obj2 = function f<T>(a: T): T { // should not error
>obj2 : <T>(a: T) => T
>function f<T>(a: T): T { // should not error
var x: T;
return a;
} : <T>(a: T) => T
>f : <T>(a: T) => T
>T : T
>a : T
>T : T
>T : T
var x: T;
>x : T
>T : T
return a;
>a : T
};