=== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts ===
// Generic call with parameter of object type with member of function type of n args passed object whose associated member is call signature with n+1 args

function foo<T, U>(arg: { cb: new(t: T) => U }) {
>foo : Symbol(foo, Decl(genericCallWithConstructorTypedArguments5.ts, 0, 0))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 13))
>U : Symbol(U, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 15))
>arg : Symbol(arg, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 19))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 25))
>t : Symbol(t, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 34))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 13))
>U : Symbol(U, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 15))

    return new arg.cb(null);
>arg.cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 25))
>arg : Symbol(arg, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 19))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 2, 25))
}

var arg: { cb: new<T>(x: T) => string };
>arg : Symbol(arg, Decl(genericCallWithConstructorTypedArguments5.ts, 6, 3))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 6, 10))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 6, 19))
>x : Symbol(x, Decl(genericCallWithConstructorTypedArguments5.ts, 6, 22))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 6, 19))

var r = foo(arg); // {}
>r : Symbol(r, Decl(genericCallWithConstructorTypedArguments5.ts, 7, 3))
>foo : Symbol(foo, Decl(genericCallWithConstructorTypedArguments5.ts, 0, 0))
>arg : Symbol(arg, Decl(genericCallWithConstructorTypedArguments5.ts, 6, 3))

// more args not allowed
var arg2: { cb: new <T>(x: T, y: T) => string };
>arg2 : Symbol(arg2, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 3))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 11))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 21))
>x : Symbol(x, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 24))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 21))
>y : Symbol(y, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 29))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 21))

var r2 = foo(arg2); // error
>r2 : Symbol(r2, Decl(genericCallWithConstructorTypedArguments5.ts, 10, 3))
>foo : Symbol(foo, Decl(genericCallWithConstructorTypedArguments5.ts, 0, 0))
>arg2 : Symbol(arg2, Decl(genericCallWithConstructorTypedArguments5.ts, 9, 3))

var arg3: { cb: new (x: string, y: number) => string };
>arg3 : Symbol(arg3, Decl(genericCallWithConstructorTypedArguments5.ts, 11, 3))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 11, 11))
>x : Symbol(x, Decl(genericCallWithConstructorTypedArguments5.ts, 11, 21))
>y : Symbol(y, Decl(genericCallWithConstructorTypedArguments5.ts, 11, 31))

var r3 = foo(arg3); // error
>r3 : Symbol(r3, Decl(genericCallWithConstructorTypedArguments5.ts, 12, 3))
>foo : Symbol(foo, Decl(genericCallWithConstructorTypedArguments5.ts, 0, 0))
>arg3 : Symbol(arg3, Decl(genericCallWithConstructorTypedArguments5.ts, 11, 3))

function foo2<T, U>(arg: { cb: new(t: T, t2: T) => U }) {
>foo2 : Symbol(foo2, Decl(genericCallWithConstructorTypedArguments5.ts, 12, 19))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 14))
>U : Symbol(U, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 16))
>arg : Symbol(arg, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 20))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 26))
>t : Symbol(t, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 35))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 14))
>t2 : Symbol(t2, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 40))
>T : Symbol(T, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 14))
>U : Symbol(U, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 16))

    return new arg.cb(null, null);
>arg.cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 26))
>arg : Symbol(arg, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 20))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 14, 26))
}

// fewer args ok
var r4 = foo(arg); // {}
>r4 : Symbol(r4, Decl(genericCallWithConstructorTypedArguments5.ts, 19, 3))
>foo : Symbol(foo, Decl(genericCallWithConstructorTypedArguments5.ts, 0, 0))
>arg : Symbol(arg, Decl(genericCallWithConstructorTypedArguments5.ts, 6, 3))

var arg4: { cb: new (x: string) => string };
>arg4 : Symbol(arg4, Decl(genericCallWithConstructorTypedArguments5.ts, 20, 3))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 20, 11))
>x : Symbol(x, Decl(genericCallWithConstructorTypedArguments5.ts, 20, 21))

var r6 = foo(arg4); // string
>r6 : Symbol(r6, Decl(genericCallWithConstructorTypedArguments5.ts, 21, 3))
>foo : Symbol(foo, Decl(genericCallWithConstructorTypedArguments5.ts, 0, 0))
>arg4 : Symbol(arg4, Decl(genericCallWithConstructorTypedArguments5.ts, 20, 3))

var arg5: { cb: new () => string };
>arg5 : Symbol(arg5, Decl(genericCallWithConstructorTypedArguments5.ts, 22, 3))
>cb : Symbol(cb, Decl(genericCallWithConstructorTypedArguments5.ts, 22, 11))

var r7 = foo(arg5); // string
>r7 : Symbol(r7, Decl(genericCallWithConstructorTypedArguments5.ts, 23, 3))
>foo : Symbol(foo, Decl(genericCallWithConstructorTypedArguments5.ts, 0, 0))
>arg5 : Symbol(arg5, Decl(genericCallWithConstructorTypedArguments5.ts, 22, 3))

