thisInInnerFunctions.ts(5,13): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
thisInInnerFunctions.ts(6,27): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
thisInInnerFunctions.ts(13,16): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
thisInInnerFunctions.ts(14,9): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.


==== thisInInnerFunctions.ts (4 errors) ====
    class Foo {
        x = "hello";
        bar() {
            function inner() {
                this.y = "hi"; // 'this' should be not type to 'Foo' either
                ~~~~
!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
!!! related TS2738 thisInInnerFunctions.ts:4:18: An outer value of 'this' is shadowed by this container.
                var f = () => this.y;  // 'this' should be not type to 'Foo' either
                              ~~~~
!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
!!! related TS2738 thisInInnerFunctions.ts:4:18: An outer value of 'this' is shadowed by this container.
            }
        }
    }
    
    function test() {
        var x = () => {
            (() => this)();
                   ~~~~
!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
            this;
            ~~~~
!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
        };
    }
    