=== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints5.ts ===
// Generic call with constraints infering type parameter from object member properties

class C {
>C : Symbol(C, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 0, 0))

    x: string;
>x : Symbol(C.x, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 2, 9))
}

class D {
>D : Symbol(D, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 4, 1))

    x: string;
>x : Symbol(D.x, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 6, 9))

    y: string;
>y : Symbol(D.y, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 7, 14))
}

function foo<T, U extends T>(t: T, t2: U) {
>foo : Symbol(foo, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 9, 1))
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 13))
>U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 15))
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 13))
>t : Symbol(t, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 29))
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 13))
>t2 : Symbol(t2, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 34))
>U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 15))

    return (x: T) => t2;
>x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 12, 12))
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 13))
>t2 : Symbol(t2, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 11, 34))
}

var c: C;
>c : Symbol(c, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 15, 3))
>C : Symbol(C, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 0, 0))

var d: D;
>d : Symbol(d, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 16, 3))
>D : Symbol(D, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 4, 1))

var r2 = foo(d, c); // the constraints are self-referencing, no downstream error
>r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 17, 3))
>foo : Symbol(foo, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 9, 1))
>d : Symbol(d, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 16, 3))
>c : Symbol(c, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 15, 3))

var r9 = foo(() => 1, () => { }); // the constraints are self-referencing, no downstream error
>r9 : Symbol(r9, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 18, 3))
>foo : Symbol(foo, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 9, 1))

function other<T, U extends T>() {
>other : Symbol(other, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 18, 33))
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 20, 15))
>U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 20, 17))
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 20, 15))

    var r5 = foo<T, U>(c, d); // error
>r5 : Symbol(r5, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 21, 7))
>foo : Symbol(foo, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 9, 1))
>T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 20, 15))
>U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 20, 17))
>c : Symbol(c, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 15, 3))
>d : Symbol(d, Decl(genericCallWithObjectTypeArgsAndConstraints5.ts, 16, 3))
}

