==== tests/cases/compiler/genericCallWithObjectTypeArgsAndConstraints5.ts (8 errors) ====
    // Generic call with constraints infering type parameter from object member properties
    
    class C {
        x: string;
    }
    
    class D {
        x: string;
        y: string;
    }
    
    function foo<T, U extends T>(t: T, t2: U) {
                    ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(12,17): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
        return (x: T) => t2;
    }
    
    var c: C;
    var d: D;
    var r2 = foo(d, c); // the constraints are self-referencing, no downstream error
             ~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(18,10): error TS2082: Supplied parameters do not match any signature of call target:
!!! 	Type 'C' is missing property 'y' from type 'D'.
             ~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(18,10): error TS2087: Could not select overload for 'call' expression.
    var r9 = foo(() => 1, () => { }); // the constraints are self-referencing, no downstream error
             ~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(19,10): error TS2082: Supplied parameters do not match any signature of call target:
!!! 	Call signatures of types '() => void' and '() => number' are incompatible.
             ~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(19,10): error TS2087: Could not select overload for 'call' expression.
    
    function other<T, U extends T>() {
                      ~~~~~~~~~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(21,19): error TS2229: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
        var r5 = foo<T, U>(c, d); // error
                 ~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(22,14): error TS2082: Supplied parameters do not match any signature of call target:
!!! 	Could not apply type 'T' to argument 1 which is of type 'C'.
                 ~~~
!!! genericCallWithObjectTypeArgsAndConstraints5.ts(22,14): error TS2087: Could not select overload for 'call' expression.
    }
    