2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/typeArgumentsInFunctionExpressions.ts ===
|
|
|
|
var obj = function f<T>(a: T) { // should not error
|
2015-04-13 23:01:57 +02:00
|
|
|
>obj : <T>(a: T) => T, Symbol(obj, Decl(typeArgumentsInFunctionExpressions.ts, 0, 3))
|
2014-08-22 03:39:46 +02:00
|
|
|
>function f<T>(a: T) { // should not error var x: T; return a;} : <T>(a: T) => T
|
2015-04-13 23:01:57 +02:00
|
|
|
>f : <T>(a: T) => T, Symbol(f, Decl(typeArgumentsInFunctionExpressions.ts, 0, 9))
|
|
|
|
>T : T, Symbol(T, Decl(typeArgumentsInFunctionExpressions.ts, 0, 21))
|
|
|
|
>a : T, Symbol(a, Decl(typeArgumentsInFunctionExpressions.ts, 0, 24))
|
|
|
|
>T : T, Symbol(T, Decl(typeArgumentsInFunctionExpressions.ts, 0, 21))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var x: T;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : T, Symbol(x, Decl(typeArgumentsInFunctionExpressions.ts, 1, 7))
|
|
|
|
>T : T, Symbol(T, Decl(typeArgumentsInFunctionExpressions.ts, 0, 21))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return a;
|
2015-04-13 23:01:57 +02:00
|
|
|
>a : T, Symbol(a, Decl(typeArgumentsInFunctionExpressions.ts, 0, 24))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var obj2 = function f<T>(a: T): T { // should not error
|
2015-04-13 23:01:57 +02:00
|
|
|
>obj2 : <T>(a: T) => T, Symbol(obj2, Decl(typeArgumentsInFunctionExpressions.ts, 5, 3))
|
2014-08-22 03:39:46 +02:00
|
|
|
>function f<T>(a: T): T { // should not error var x: T; return a;} : <T>(a: T) => T
|
2015-04-13 23:01:57 +02:00
|
|
|
>f : <T>(a: T) => T, Symbol(f, Decl(typeArgumentsInFunctionExpressions.ts, 5, 10))
|
|
|
|
>T : T, Symbol(T, Decl(typeArgumentsInFunctionExpressions.ts, 5, 22))
|
|
|
|
>a : T, Symbol(a, Decl(typeArgumentsInFunctionExpressions.ts, 5, 25))
|
|
|
|
>T : T, Symbol(T, Decl(typeArgumentsInFunctionExpressions.ts, 5, 22))
|
|
|
|
>T : T, Symbol(T, Decl(typeArgumentsInFunctionExpressions.ts, 5, 22))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var x: T;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : T, Symbol(x, Decl(typeArgumentsInFunctionExpressions.ts, 6, 7))
|
|
|
|
>T : T, Symbol(T, Decl(typeArgumentsInFunctionExpressions.ts, 5, 22))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return a;
|
2015-04-13 23:01:57 +02:00
|
|
|
>a : T, Symbol(a, Decl(typeArgumentsInFunctionExpressions.ts, 5, 25))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|