TypeScript/tests/baselines/reference/genericTypeAssertions3.types

24 lines
740 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== 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
>< <T>(x: T) => T > ((x) => { return null; }) : <T>(x: T) => T
>T : T
>x : T
>T : T
>T : T
>((x) => { return null; }) : (x: any) => any
>(x) => { return null; } : (x: any) => any
>x : any
var s = < <T>(x: T) => T > ((x: any) => { return null; }); // no error
>s : <T>(x: T) => T
>< <T>(x: T) => T > ((x: any) => { return null; }) : <T>(x: T) => T
>T : T
>x : T
>T : T
>T : T
>((x: any) => { return null; }) : (x: any) => any
>(x: any) => { return null; } : (x: any) => any
>x : any