TypeScript/tests/baselines/reference/genericTypeAssertions3.types
2015-04-13 14:29:37 -07:00

26 lines
1.3 KiB
Plaintext

=== tests/cases/compiler/genericTypeAssertions3.ts ===
var r = < <T>(x: T) => T > ((x) => { return null; }); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error
>r : <T>(x: T) => T, Symbol(r, Decl(genericTypeAssertions3.ts, 0, 3))
>< <T>(x: T) => T > ((x) => { return null; }) : <T>(x: T) => T
>T : T, Symbol(T, Decl(genericTypeAssertions3.ts, 0, 11))
>x : T, Symbol(x, Decl(genericTypeAssertions3.ts, 0, 14))
>T : T, Symbol(T, Decl(genericTypeAssertions3.ts, 0, 11))
>T : T, Symbol(T, Decl(genericTypeAssertions3.ts, 0, 11))
>((x) => { return null; }) : (x: any) => any
>(x) => { return null; } : (x: any) => any
>x : any, Symbol(x, Decl(genericTypeAssertions3.ts, 0, 29))
>null : null
var s = < <T>(x: T) => T > ((x: any) => { return null; }); // no error
>s : <T>(x: T) => T, Symbol(s, Decl(genericTypeAssertions3.ts, 1, 3))
>< <T>(x: T) => T > ((x: any) => { return null; }) : <T>(x: T) => T
>T : T, Symbol(T, Decl(genericTypeAssertions3.ts, 1, 11))
>x : T, Symbol(x, Decl(genericTypeAssertions3.ts, 1, 14))
>T : T, Symbol(T, Decl(genericTypeAssertions3.ts, 1, 11))
>T : T, Symbol(T, Decl(genericTypeAssertions3.ts, 1, 11))
>((x: any) => { return null; }) : (x: any) => any
>(x: any) => { return null; } : (x: any) => any
>x : any, Symbol(x, Decl(genericTypeAssertions3.ts, 1, 29))
>null : null