TypeScript/tests/baselines/reference/badThisBinding.types
2014-08-25 10:55:22 -07:00

32 lines
687 B
Text

=== tests/cases/compiler/badThisBinding.ts ===
declare function foo(a:any): any;
>foo : typeof foo
>a : any
declare function bar(a:any): any;
>bar : typeof bar
>a : any
class Greeter {
>Greeter : Greeter
constructor() {
foo(() => {
>foo(() => { bar(() => { var x = this; }); }) : any
>foo : typeof foo
>() => { bar(() => { var x = this; }); } : () => void
bar(() => {
>bar(() => { var x = this; }) : any
>bar : typeof bar
>() => { var x = this; } : () => void
var x = this;
>x : Greeter
>this : Greeter
});
});
}
}