tests/cases/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope.ts(20,10): error TS2684: The 'this' context of type 'C<number>' is not assignable to method's 'this' of type 'C<T>'.
  Type 'number' is not assignable to type 'T'.
    'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.


==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParametersAvailableInNestedScope.ts (1 errors) ====
    class C<T> {
        data: T;
    
        x = <U>(a: U) => {
            var y: T;
            return y;
        }
    
        foo() {
            function temp<U>(a: U) {
                var y: T;
                return y;
            }
            return temp(<T>null);
        }
    }
    
    var c = new C<number>();
    c.data = c.x(null);
    c.data = c.foo();
             ~
!!! error TS2684: The 'this' context of type 'C<number>' is not assignable to method's 'this' of type 'C<T>'.
!!! error TS2684:   Type 'number' is not assignable to type 'T'.
!!! error TS2684:     'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
    