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