tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(62,10): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
  Type 'string' is not assignable to type 'T'.
    'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(63,10): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(64,10): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(65,10): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(66,10): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(67,10): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(68,11): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts(69,11): error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.


==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallTypeArgumentInference.ts (8 errors) ====
    // Basic type inference with generic calls, no errors expected
    
    function foo<T>(t: T) {
        return t;
    }
    
    var r = foo(''); // string
    
    function foo2<T, U>(t: T, u: U) {
        return u;
    }
    
    function foo2b<T, U>(u: U) {
        var x: T;
        return x;
    }
    
    var r2 = foo2('', 1); // number
    var r3 = foo2b(1); // {}
    
    class C<T, U> {
        constructor(public t: T, public u: U) {
        }
    
        foo(t: T, u: U) {
            return t;
        }
    
        foo2(t: T, u: U) {
            return u;
        }
    
        foo3<T>(t: T, u: U) {
            return t;
        }
    
        foo4<U>(t: T, u: U) {
            return t;
        }
    
        foo5<T,U>(t: T, u: U) {
            return t;
        }
    
        foo6<T, U>() {
            var x: T;
            return x;
        }
    
        foo7<T, U>(u: U) {
            var x: T;
            return x;
        }
    
        foo8<T, U>() {
            var x: T;
            return x;
        }
    }
    
    var c = new C('', 1);
    var r4 = c.foo('', 1); // string
             ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
!!! error TS2684:   Type 'string' is not assignable to type 'T'.
!!! error TS2684:     'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
    var r5 = c.foo2('', 1); // number
             ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
    var r6 = c.foo3(true, 1); // boolean
             ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
    var r7 = c.foo4('', true); // string
             ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
    var r8 = c.foo5(true, 1); // boolean
             ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
    var r9 = c.foo6(); // {}
             ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
    var r10 = c.foo7(''); // {}
              ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
    var r11 = c.foo8(); // {}
              ~
!!! error TS2684: The 'this' context of type 'C<string, number>' is not assignable to method's 'this' of type 'C<T, U>'.
    
    interface I<T, U> {
        new (t: T, u: U);
        foo(t: T, u: U): T;
        foo2(t: T, u: U): U;
        foo3<T>(t: T, u: U): T;
        foo4<U>(t: T, u: U): T;
        foo5<T, U>(t: T, u: U): T;
        foo6<T, U>(): T;
        foo7<T, U>(u: U): T;
        foo8<T, U>(): T;    
    }
    
    var i: I<string, number>;
    var r4 = i.foo('', 1); // string
    var r5 = i.foo2('', 1); // number
    var r6 = i.foo3(true, 1); // boolean
    var r7 = i.foo4('', true); // string
    var r8 = i.foo5(true, 1); // boolean
    var r9 = i.foo6(); // {}
    var r10 = i.foo7(''); // {}
    var r11 = i.foo8(); // {}