TypeScript/tests/baselines/reference/genericTypeAssertions3.types

26 lines
1.3 KiB
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
2015-04-13 23:01:57 +02:00
>r : <T>(x: T) => T, Symbol(r, Decl(genericTypeAssertions3.ts, 0, 3))
2014-08-15 23:33:16 +02:00
>< <T>(x: T) => T > ((x) => { return null; }) : <T>(x: T) => T
2015-04-13 23:01:57 +02:00
>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))
2014-08-15 23:33:16 +02:00
>((x) => { return null; }) : (x: any) => any
>(x) => { return null; } : (x: any) => any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(genericTypeAssertions3.ts, 0, 29))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
var s = < <T>(x: T) => T > ((x: any) => { return null; }); // no error
2015-04-13 23:01:57 +02:00
>s : <T>(x: T) => T, Symbol(s, Decl(genericTypeAssertions3.ts, 1, 3))
2014-08-15 23:33:16 +02:00
>< <T>(x: T) => T > ((x: any) => { return null; }) : <T>(x: T) => T
2015-04-13 23:01:57 +02:00
>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))
2014-08-15 23:33:16 +02:00
>((x: any) => { return null; }) : (x: any) => any
>(x: any) => { return null; } : (x: any) => any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(genericTypeAssertions3.ts, 1, 29))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00