169 lines
6.5 KiB
Plaintext
169 lines
6.5 KiB
Plaintext
=== tests/cases/compiler/fatarrowfunctions.ts ===
|
|
|
|
function foo(x:any) {
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 1, 13))
|
|
|
|
return x();
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 1, 13))
|
|
}
|
|
|
|
|
|
foo((x:number,y,z)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 6, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 6, 14))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 6, 16))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 6, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 6, 14))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 6, 16))
|
|
|
|
foo((x,y,z)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 7, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 7, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 7, 9))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 7, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 7, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 7, 9))
|
|
|
|
foo((x,y:number,z)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 8, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 8, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 8, 16))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 8, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 8, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 8, 16))
|
|
|
|
foo((x,y:number,z:number)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 9, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 9, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 9, 16))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 9, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 9, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 9, 16))
|
|
|
|
foo((x,y,z:number)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 10, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 10, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 10, 9))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 10, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 10, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 10, 9))
|
|
|
|
foo(()=>{return 0;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
|
|
foo((x:number,y,z)=>x+y+z);
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 13, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 13, 14))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 13, 16))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 13, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 13, 14))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 13, 16))
|
|
|
|
foo((x,y,z)=>x+y+z);
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 14, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 14, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 14, 9))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 14, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 14, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 14, 9))
|
|
|
|
foo((x,y:number,z)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 15, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 15, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 15, 16))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 15, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 15, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 15, 16))
|
|
|
|
foo((x,y:number,z:number)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 16, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 16, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 16, 16))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 16, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 16, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 16, 16))
|
|
|
|
foo((x,y,z:number)=>{return x+y+z;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 17, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 17, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 17, 9))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 17, 5))
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 17, 7))
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 17, 9))
|
|
|
|
foo(()=>{return 0;});
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
|
|
|
|
foo(((x) => x));
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 21, 6))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 21, 6))
|
|
|
|
foo(x => x*x);
|
|
>foo : Symbol(foo, Decl(fatarrowfunctions.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 23, 4))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 23, 4))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 23, 4))
|
|
|
|
var y = x => x*x;
|
|
>y : Symbol(y, Decl(fatarrowfunctions.ts, 25, 3))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 25, 7))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 25, 7))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 25, 7))
|
|
|
|
var z = (x:number) => x*x;
|
|
>z : Symbol(z, Decl(fatarrowfunctions.ts, 26, 3))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 26, 9))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 26, 9))
|
|
>x : Symbol(x, Decl(fatarrowfunctions.ts, 26, 9))
|
|
|
|
var w = () => 3;
|
|
>w : Symbol(w, Decl(fatarrowfunctions.ts, 28, 3))
|
|
|
|
function ternaryTest(isWhile:boolean) {
|
|
>ternaryTest : Symbol(ternaryTest, Decl(fatarrowfunctions.ts, 28, 16))
|
|
>isWhile : Symbol(isWhile, Decl(fatarrowfunctions.ts, 30, 21))
|
|
|
|
var f = isWhile ? function (n) { return n > 0; } : function (n) { return n === 0; };
|
|
>f : Symbol(f, Decl(fatarrowfunctions.ts, 32, 19))
|
|
>isWhile : Symbol(isWhile, Decl(fatarrowfunctions.ts, 30, 21))
|
|
>n : Symbol(n, Decl(fatarrowfunctions.ts, 32, 44))
|
|
>n : Symbol(n, Decl(fatarrowfunctions.ts, 32, 44))
|
|
>n : Symbol(n, Decl(fatarrowfunctions.ts, 32, 77))
|
|
>n : Symbol(n, Decl(fatarrowfunctions.ts, 32, 77))
|
|
|
|
}
|
|
|
|
declare function setTimeout(expression: any, msec?: number, language?: any): number;
|
|
>setTimeout : Symbol(setTimeout, Decl(fatarrowfunctions.ts, 34, 1))
|
|
>expression : Symbol(expression, Decl(fatarrowfunctions.ts, 36, 28))
|
|
>msec : Symbol(msec, Decl(fatarrowfunctions.ts, 36, 44))
|
|
>language : Symbol(language, Decl(fatarrowfunctions.ts, 36, 59))
|
|
|
|
var messenger = {
|
|
>messenger : Symbol(messenger, Decl(fatarrowfunctions.ts, 38, 3))
|
|
|
|
message: "Hello World",
|
|
>message : Symbol(message, Decl(fatarrowfunctions.ts, 38, 17))
|
|
|
|
start: function() {
|
|
>start : Symbol(start, Decl(fatarrowfunctions.ts, 39, 27))
|
|
|
|
setTimeout(() => { this.message.toString(); }, 3000);
|
|
>setTimeout : Symbol(setTimeout, Decl(fatarrowfunctions.ts, 34, 1))
|
|
}
|
|
};
|
|
|