TypeScript/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types

49 lines
2.6 KiB
Text
Raw Normal View History

2015-03-07 11:08:36 +01:00
=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts ===
var a = () => <Error>{ name: "foo", message: "bar" };
>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
>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 : string, Symbol(name,Decl(arrowFunctionWithObjectLiteralBody6.ts,0,22))
2015-04-13 21:36:11 +02:00
>"foo" : string
>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" });
>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
>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 : string, Symbol(name,Decl(arrowFunctionWithObjectLiteralBody6.ts,2,23))
2015-04-13 21:36:11 +02:00
>"foo" : string
>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" });
>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; }
>name : string, Symbol(name,Decl(arrowFunctionWithObjectLiteralBody6.ts,4,16))
2015-04-13 21:36:11 +02:00
>"foo" : string
>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" })));
>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
>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; }
>name : string, Symbol(name,Decl(arrowFunctionWithObjectLiteralBody6.ts,6,25))
2015-04-13 21:36:11 +02:00
>"foo" : string
>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