TypeScript/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types

49 lines
2.7 KiB
Plaintext
Raw Normal View History

2015-03-07 11:08:36 +01:00
=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts ===
var a = () => <Error>{ name: "foo", message: "bar" };
2015-04-13 23:01:57 +02:00
>a : () => Error, Symbol(a, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 3))
2015-03-07 11:08:36 +01:00
>() => <Error>{ name: "foo", message: "bar" } : () => Error
><Error>{ name: "foo", message: "bar" } : Error
2015-04-13 23:01:57 +02:00
>Error : Error, Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11))
2015-03-07 11:08:36 +01:00
>{ name: "foo", message: "bar" } : { name: string; message: string; }
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 22))
2015-04-13 21:36:11 +02:00
>"foo" : string
2015-04-13 23:01:57 +02:00
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 35))
2015-04-13 21:36:11 +02:00
>"bar" : string
2015-03-07 11:08:36 +01:00
var b = () => (<Error>{ name: "foo", message: "bar" });
2015-04-13 23:01:57 +02:00
>b : () => Error, Symbol(b, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 3))
2015-03-07 11:08:36 +01:00
>() => (<Error>{ name: "foo", message: "bar" }) : () => Error
>(<Error>{ name: "foo", message: "bar" }) : Error
><Error>{ name: "foo", message: "bar" } : Error
2015-04-13 23:01:57 +02:00
>Error : Error, Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11))
2015-03-07 11:08:36 +01:00
>{ name: "foo", message: "bar" } : { name: string; message: string; }
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 23))
2015-04-13 21:36:11 +02:00
>"foo" : string
2015-04-13 23:01:57 +02:00
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 36))
2015-04-13 21:36:11 +02:00
>"bar" : string
2015-03-07 11:08:36 +01:00
var c = () => ({ name: "foo", message: "bar" });
2015-04-13 23:01:57 +02:00
>c : () => { name: string; message: string; }, Symbol(c, Decl(arrowFunctionWithObjectLiteralBody6.ts, 4, 3))
2015-03-07 11:08:36 +01:00
>() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; }
>({ name: "foo", message: "bar" }) : { name: string; message: string; }
>{ name: "foo", message: "bar" } : { name: string; message: string; }
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 4, 16))
2015-04-13 21:36:11 +02:00
>"foo" : string
2015-04-13 23:01:57 +02:00
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 4, 29))
2015-04-13 21:36:11 +02:00
>"bar" : string
2015-03-07 11:08:36 +01:00
var d = () => ((<Error>({ name: "foo", message: "bar" })));
2015-04-13 23:01:57 +02:00
>d : () => Error, Symbol(d, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 3))
2015-03-07 11:08:36 +01:00
>() => ((<Error>({ name: "foo", message: "bar" }))) : () => Error
>((<Error>({ name: "foo", message: "bar" }))) : Error
>(<Error>({ name: "foo", message: "bar" })) : Error
><Error>({ name: "foo", message: "bar" }) : Error
2015-04-13 23:01:57 +02:00
>Error : Error, Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11))
2015-03-07 11:08:36 +01:00
>({ name: "foo", message: "bar" }) : { name: string; message: string; }
>{ name: "foo", message: "bar" } : { name: string; message: string; }
2015-04-13 23:01:57 +02:00
>name : string, Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 25))
2015-04-13 21:36:11 +02:00
>"foo" : string
2015-04-13 23:01:57 +02:00
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 38))
2015-04-13 21:36:11 +02:00
>"bar" : string
2015-03-07 11:08:36 +01:00