TypeScript/tests/baselines/reference/genericTypeAssertions3.types
2015-04-15 16:44:20 -07:00

26 lines
768 B
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
>< <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
>null : null
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
>null : null