2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInProperty.ts ===
|
|
|
|
class class1 {
|
|
|
|
>class1 : class1
|
|
|
|
|
|
|
|
public prop1 = {
|
|
|
|
>prop1 : { doStuff: (callback: any) => () => any; }
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class class2 {
|
|
|
|
>class2 : class2
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
var _this = 2;
|
|
|
|
>_this : number
|
|
|
|
}
|
|
|
|
public prop1 = {
|
|
|
|
>prop1 : { doStuff: (callback: any) => () => any; }
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ doStuff: (callback) => () => { return callback(10); } } : { 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(10); } : (callback: any) => () => any
|
2014-08-15 23:33:16 +02:00
|
|
|
>callback : any
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { return callback(10); } : () => any
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return callback(10);
|
|
|
|
>callback(10) : any
|
|
|
|
>callback : any
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|