24 lines
740 B
Plaintext
24 lines
740 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
|
||
|
|
||
|
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
|
||
|
|