2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/badThisBinding.ts ===
|
|
|
|
declare function foo(a:any): any;
|
2014-08-28 21:52:44 +02:00
|
|
|
>foo : (a: any) => any
|
2014-08-15 23:33:16 +02:00
|
|
|
>a : any
|
|
|
|
|
|
|
|
declare function bar(a:any): any;
|
2014-08-28 21:52:44 +02:00
|
|
|
>bar : (a: any) => any
|
2014-08-15 23:33:16 +02:00
|
|
|
>a : any
|
|
|
|
|
|
|
|
class Greeter {
|
|
|
|
>Greeter : Greeter
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
foo(() => {
|
2014-08-22 03:39:46 +02:00
|
|
|
>foo(() => { bar(() => { var x = this; }); }) : any
|
2014-08-28 21:52:44 +02:00
|
|
|
>foo : (a: any) => any
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { bar(() => { var x = this; }); } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
bar(() => {
|
2014-08-22 03:39:46 +02:00
|
|
|
>bar(() => { var x = this; }) : any
|
2014-08-28 21:52:44 +02:00
|
|
|
>bar : (a: any) => any
|
2014-08-22 03:39:46 +02:00
|
|
|
>() => { var x = this; } : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var x = this;
|
|
|
|
>x : Greeter
|
|
|
|
>this : Greeter
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|