TypeScript/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.types
2015-04-13 14:29:37 -07:00

49 lines
2.7 KiB
Plaintext

=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts ===
var a = () => <Error>{ name: "foo", message: "bar" };
>a : () => Error, Symbol(a, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 3))
>() => <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))
>{ name: "foo", message: "bar" } : { name: string; message: string; }
>name : string, Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 22))
>"foo" : string
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 35))
>"bar" : string
var b = () => (<Error>{ name: "foo", message: "bar" });
>b : () => Error, Symbol(b, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 3))
>() => (<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))
>{ name: "foo", message: "bar" } : { name: string; message: string; }
>name : string, Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 23))
>"foo" : string
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 36))
>"bar" : string
var c = () => ({ name: "foo", message: "bar" });
>c : () => { name: string; message: string; }, Symbol(c, Decl(arrowFunctionWithObjectLiteralBody6.ts, 4, 3))
>() => ({ 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))
>"foo" : string
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 4, 29))
>"bar" : string
var d = () => ((<Error>({ name: "foo", message: "bar" })));
>d : () => Error, Symbol(d, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 3))
>() => ((<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))
>({ 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))
>"foo" : string
>message : string, Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 38))
>"bar" : string