28 lines
731 B
Text
28 lines
731 B
Text
=== tests/cases/compiler/badThisBinding.ts ===
|
|
declare function foo(a:any): any;
|
|
>foo : Symbol(foo, Decl(badThisBinding.ts, 0, 0))
|
|
>a : Symbol(a, Decl(badThisBinding.ts, 0, 21))
|
|
|
|
declare function bar(a:any): any;
|
|
>bar : Symbol(bar, Decl(badThisBinding.ts, 0, 33))
|
|
>a : Symbol(a, Decl(badThisBinding.ts, 1, 21))
|
|
|
|
class Greeter {
|
|
>Greeter : Symbol(Greeter, Decl(badThisBinding.ts, 1, 33))
|
|
|
|
constructor() {
|
|
foo(() => {
|
|
>foo : Symbol(foo, Decl(badThisBinding.ts, 0, 0))
|
|
|
|
bar(() => {
|
|
>bar : Symbol(bar, Decl(badThisBinding.ts, 0, 33))
|
|
|
|
var x = this;
|
|
>x : Symbol(x, Decl(badThisBinding.ts, 7, 19))
|
|
>this : Symbol(Greeter, Decl(badThisBinding.ts, 1, 33))
|
|
|
|
});
|
|
});
|
|
}
|
|
|
|
}
|