38 lines
1.2 KiB
Text
38 lines
1.2 KiB
Text
=== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInLambda.ts ===
|
|
declare function alert(message?: any): void;
|
|
>alert : (message?: any) => void
|
|
>message : any
|
|
|
|
var x = {
|
|
>x : { doStuff: (callback: any) => () => any; }
|
|
>{ doStuff: (callback) => () => { var _this = 2; return callback(_this); }} : { doStuff: (callback: any) => () => any; }
|
|
|
|
doStuff: (callback) => () => {
|
|
>doStuff : (callback: any) => () => any
|
|
>(callback) => () => { var _this = 2; return callback(_this); } : (callback: any) => () => any
|
|
>callback : any
|
|
>() => { var _this = 2; return callback(_this); } : () => any
|
|
|
|
var _this = 2;
|
|
>_this : number
|
|
>2 : number
|
|
|
|
return callback(_this);
|
|
>callback(_this) : any
|
|
>callback : any
|
|
>_this : number
|
|
}
|
|
}
|
|
alert(x.doStuff(x => alert(x)));
|
|
>alert(x.doStuff(x => alert(x))) : void
|
|
>alert : (message?: any) => void
|
|
>x.doStuff(x => alert(x)) : () => any
|
|
>x.doStuff : (callback: any) => () => any
|
|
>x : { doStuff: (callback: any) => () => any; }
|
|
>doStuff : (callback: any) => () => any
|
|
>x => alert(x) : (x: any) => void
|
|
>x : any
|
|
>alert(x) : void
|
|
>alert : (message?: any) => void
|
|
>x : any
|
|
|