TypeScript/tests/cases/compiler/thisInInnerFunctions.ts
2014-07-12 17:30:19 -07:00

17 lines
340 B
TypeScript

class Foo {
x = "hello";
bar() {
function inner() {
this.y = "hi"; // 'this' should be not type to 'Foo' either
var f = () => this.y; // 'this' should be not type to 'Foo' either
}
}
}
function test() {
var x = () => {
(() => this)();
this;
};
}