19 lines
927 B
Text
19 lines
927 B
Text
=== tests/cases/compiler/genericParameterAssignability1.ts ===
|
|
function f<T>(x: T): T { return null; }
|
|
>f : Symbol(f, Decl(genericParameterAssignability1.ts, 0, 0))
|
|
>T : Symbol(T, Decl(genericParameterAssignability1.ts, 0, 11))
|
|
>x : Symbol(x, Decl(genericParameterAssignability1.ts, 0, 14))
|
|
>T : Symbol(T, Decl(genericParameterAssignability1.ts, 0, 11))
|
|
>T : Symbol(T, Decl(genericParameterAssignability1.ts, 0, 11))
|
|
|
|
var r = <T>(x: T) => x;
|
|
>r : Symbol(r, Decl(genericParameterAssignability1.ts, 1, 3))
|
|
>T : Symbol(T, Decl(genericParameterAssignability1.ts, 1, 9))
|
|
>x : Symbol(x, Decl(genericParameterAssignability1.ts, 1, 12))
|
|
>T : Symbol(T, Decl(genericParameterAssignability1.ts, 1, 9))
|
|
>x : Symbol(x, Decl(genericParameterAssignability1.ts, 1, 12))
|
|
|
|
r = f; // should be allowed
|
|
>r : Symbol(r, Decl(genericParameterAssignability1.ts, 1, 3))
|
|
>f : Symbol(f, Decl(genericParameterAssignability1.ts, 0, 0))
|
|
|