55 lines
1.7 KiB
Text
55 lines
1.7 KiB
Text
=== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInMethod.ts ===
|
|
var _this = 2;
|
|
>_this : number
|
|
>2 : number
|
|
|
|
class a {
|
|
>a : a
|
|
|
|
method1() {
|
|
>method1 : () => { doStuff: (callback: any) => () => any; }
|
|
|
|
return {
|
|
>{ 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
|
|
}
|
|
}
|
|
}
|
|
method2() {
|
|
>method2 : () => { doStuff: (callback: any) => () => any; }
|
|
|
|
var _this = 2;
|
|
>_this : number
|
|
>2 : number
|
|
|
|
return {
|
|
>{ doStuff: (callback) => () => { return callback(_this); } } : { doStuff: (callback: any) => () => any; }
|
|
|
|
doStuff: (callback) => () => {
|
|
>doStuff : (callback: any) => () => any
|
|
>(callback) => () => { return callback(_this); } : (callback: any) => () => any
|
|
>callback : any
|
|
>() => { return callback(_this); } : () => any
|
|
|
|
return callback(_this);
|
|
>callback(_this) : any
|
|
>callback : any
|
|
>_this : number
|
|
}
|
|
}
|
|
}
|
|
}
|