2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInMethod.ts ===
|
|
|
|
var _this = 2;
|
|
|
|
>_this : number
|
|
|
|
|
|
|
|
class a {
|
|
|
|
>a : a
|
|
|
|
|
|
|
|
method1() {
|
|
|
|
>method1 : () => { doStuff: (callback: any) => () => any; }
|
|
|
|
|
|
|
|
return {
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ doStuff: (callback) => () => { var _this = 2; return callback(_this); } } : { doStuff: (callback: any) => () => any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
doStuff: (callback) => () => {
|
|
|
|
>doStuff : (callback: any) => () => any
|
2014-08-22 03:39:46 +02:00
|
|
|
>(callback) => () => { var _this = 2; return callback(_this); } : (callback: any) => () => any
|
2014-08-15 23:33:16 +02:00
|
|
|
>callback : any
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { var _this = 2; return callback(_this); } : () => any
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var _this = 2;
|
|
|
|
>_this : number
|
|
|
|
|
|
|
|
return callback(_this);
|
|
|
|
>callback(_this) : any
|
|
|
|
>callback : any
|
|
|
|
>_this : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
method2() {
|
|
|
|
>method2 : () => { doStuff: (callback: any) => () => any; }
|
|
|
|
|
|
|
|
var _this = 2;
|
|
|
|
>_this : number
|
|
|
|
|
|
|
|
return {
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ doStuff: (callback) => () => { return callback(_this); } } : { doStuff: (callback: any) => () => any; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
doStuff: (callback) => () => {
|
|
|
|
>doStuff : (callback: any) => () => any
|
2014-08-22 03:39:46 +02:00
|
|
|
>(callback) => () => { return callback(_this); } : (callback: any) => () => any
|
2014-08-15 23:33:16 +02:00
|
|
|
>callback : any
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { return callback(_this); } : () => any
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return callback(_this);
|
|
|
|
>callback(_this) : any
|
|
|
|
>callback : any
|
|
|
|
>_this : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|