=== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures5.ts === // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain class Base { foo: string; } >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >foo : string, Symbol(foo, Decl(subtypingWithConstructSignatures5.ts, 3, 12)) class Derived extends Base { bar: string; } >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >bar : string, Symbol(bar, Decl(subtypingWithConstructSignatures5.ts, 4, 28)) class Derived2 extends Derived { baz: string; } >Derived2 : Derived2, Symbol(Derived2, Decl(subtypingWithConstructSignatures5.ts, 4, 43)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >baz : string, Symbol(baz, Decl(subtypingWithConstructSignatures5.ts, 5, 32)) class OtherDerived extends Base { bing: string; } >OtherDerived : OtherDerived, Symbol(OtherDerived, Decl(subtypingWithConstructSignatures5.ts, 5, 47)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >bing : string, Symbol(bing, Decl(subtypingWithConstructSignatures5.ts, 6, 33)) interface A { // T >A : A, Symbol(A, Decl(subtypingWithConstructSignatures5.ts, 6, 49)) // M's a: new (x: number) => number[]; >a : new (x: number) => number[], Symbol(a, Decl(subtypingWithConstructSignatures5.ts, 8, 13)) >x : number, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 10, 12)) a2: new (x: number) => string[]; >a2 : new (x: number) => string[], Symbol(a2, Decl(subtypingWithConstructSignatures5.ts, 10, 35)) >x : number, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 11, 13)) a3: new (x: number) => void; >a3 : new (x: number) => void, Symbol(a3, Decl(subtypingWithConstructSignatures5.ts, 11, 36)) >x : number, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 12, 13)) a4: new (x: string, y: number) => string; >a4 : new (x: string, y: number) => string, Symbol(a4, Decl(subtypingWithConstructSignatures5.ts, 12, 32)) >x : string, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 13, 13)) >y : number, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 13, 23)) a5: new (x: (arg: string) => number) => string; >a5 : new (x: (arg: string) => number) => string, Symbol(a5, Decl(subtypingWithConstructSignatures5.ts, 13, 45)) >x : (arg: string) => number, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 14, 13)) >arg : string, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 14, 17)) a6: new (x: (arg: Base) => Derived) => Base; >a6 : new (x: (arg: Base) => Derived) => Base, Symbol(a6, Decl(subtypingWithConstructSignatures5.ts, 14, 51)) >x : (arg: Base) => Derived, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 15, 13)) >arg : Base, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 15, 17)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived; >a7 : new (x: (arg: Base) => Derived) => (r: Base) => Derived, Symbol(a7, Decl(subtypingWithConstructSignatures5.ts, 15, 48)) >x : (arg: Base) => Derived, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 16, 13)) >arg : Base, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 16, 17)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >r : Base, Symbol(r, Decl(subtypingWithConstructSignatures5.ts, 16, 44)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a8: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a8 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived, Symbol(a8, Decl(subtypingWithConstructSignatures5.ts, 16, 64)) >x : (arg: Base) => Derived, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 17, 13)) >arg : Base, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 17, 17)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >y : (arg2: Base) => Derived, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 17, 39)) >arg2 : Base, Symbol(arg2, Decl(subtypingWithConstructSignatures5.ts, 17, 44)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >r : Base, Symbol(r, Decl(subtypingWithConstructSignatures5.ts, 17, 72)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a9: new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived; >a9 : new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived, Symbol(a9, Decl(subtypingWithConstructSignatures5.ts, 17, 92)) >x : (arg: Base) => Derived, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 18, 13)) >arg : Base, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 18, 17)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >y : (arg2: Base) => Derived, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 18, 39)) >arg2 : Base, Symbol(arg2, Decl(subtypingWithConstructSignatures5.ts, 18, 44)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >r : Base, Symbol(r, Decl(subtypingWithConstructSignatures5.ts, 18, 72)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a10: new (...x: Derived[]) => Derived; >a10 : new (...x: Derived[]) => Derived, Symbol(a10, Decl(subtypingWithConstructSignatures5.ts, 18, 92)) >x : Derived[], Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 19, 14)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; >a11 : new (x: { foo: string; }, y: { foo: string; bar: string; }) => Base, Symbol(a11, Decl(subtypingWithConstructSignatures5.ts, 19, 42)) >x : { foo: string; }, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 20, 14)) >foo : string, Symbol(foo, Decl(subtypingWithConstructSignatures5.ts, 20, 18)) >y : { foo: string; bar: string; }, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 20, 33)) >foo : string, Symbol(foo, Decl(subtypingWithConstructSignatures5.ts, 20, 38)) >bar : string, Symbol(bar, Decl(subtypingWithConstructSignatures5.ts, 20, 51)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) a12: new (x: Array, y: Array) => Array; >a12 : new (x: Base[], y: Derived2[]) => Derived[], Symbol(a12, Decl(subtypingWithConstructSignatures5.ts, 20, 75)) >x : Base[], Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 21, 14)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : Derived2[], Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 21, 29)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Derived2 : Derived2, Symbol(Derived2, Decl(subtypingWithConstructSignatures5.ts, 4, 43)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a13: new (x: Array, y: Array) => Array; >a13 : new (x: Base[], y: Derived[]) => Derived[], Symbol(a13, Decl(subtypingWithConstructSignatures5.ts, 21, 68)) >x : Base[], Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 22, 14)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : Derived[], Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 22, 29)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a14: new (x: { a: string; b: number }) => Object; >a14 : new (x: { a: string; b: number; }) => Object, Symbol(a14, Decl(subtypingWithConstructSignatures5.ts, 22, 67)) >x : { a: string; b: number; }, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 23, 14)) >a : string, Symbol(a, Decl(subtypingWithConstructSignatures5.ts, 23, 18)) >b : number, Symbol(b, Decl(subtypingWithConstructSignatures5.ts, 23, 29)) >Object : Object, Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) } interface B extends A { >B : B, Symbol(B, Decl(subtypingWithConstructSignatures5.ts, 24, 1)) >A : A, Symbol(A, Decl(subtypingWithConstructSignatures5.ts, 6, 49)) a: new (x: T) => T[]; >a : new (x: T) => T[], Symbol(a, Decl(subtypingWithConstructSignatures5.ts, 26, 23)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 27, 12)) >x : T, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 27, 15)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 27, 12)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 27, 12)) } // S's interface I extends B { >I : I, Symbol(I, Decl(subtypingWithConstructSignatures5.ts, 28, 1)) >B : B, Symbol(B, Decl(subtypingWithConstructSignatures5.ts, 24, 1)) // N's a: new (x: T) => T[]; // ok, instantiation of N is a subtype of M, T is number >a : new (x: T) => T[], Symbol(a, Decl(subtypingWithConstructSignatures5.ts, 31, 23)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 33, 12)) >x : T, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 33, 15)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 33, 12)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 33, 12)) a2: new (x: T) => string[]; // ok >a2 : new (x: T) => string[], Symbol(a2, Decl(subtypingWithConstructSignatures5.ts, 33, 28)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 34, 13)) >x : T, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 34, 16)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 34, 13)) a3: new (x: T) => T; // ok since Base returns void >a3 : new (x: T) => T, Symbol(a3, Decl(subtypingWithConstructSignatures5.ts, 34, 34)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 35, 13)) >x : T, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 35, 16)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 35, 13)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 35, 13)) a4: new (x: T, y: U) => T; // ok, instantiation of N is a subtype of M, T is string, U is number >a4 : new (x: T, y: U) => T, Symbol(a4, Decl(subtypingWithConstructSignatures5.ts, 35, 27)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 36, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 36, 15)) >x : T, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 36, 19)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 36, 13)) >y : U, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 36, 24)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 36, 15)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 36, 13)) a5: new (x: (arg: T) => U) => T; // ok, U is in a parameter position so inferences can be made >a5 : new (x: (arg: T) => U) => T, Symbol(a5, Decl(subtypingWithConstructSignatures5.ts, 36, 36)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 37, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 37, 15)) >x : (arg: T) => U, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 37, 19)) >arg : T, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 37, 23)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 37, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 37, 15)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 37, 13)) a6: new (x: (arg: T) => U) => T; // ok, same as a5 but with object type hierarchy >a6 : new (x: (arg: T) => U) => T, Symbol(a6, Decl(subtypingWithConstructSignatures5.ts, 37, 42)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 38, 13)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 38, 28)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >x : (arg: T) => U, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 38, 48)) >arg : T, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 38, 52)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 38, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 38, 28)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 38, 13)) a7: new (x: (arg: T) => U) => (r: T) => U; // ok >a7 : new (x: (arg: T) => U) => (r: T) => U, Symbol(a7, Decl(subtypingWithConstructSignatures5.ts, 38, 71)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 39, 13)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 39, 28)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >x : (arg: T) => U, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 39, 48)) >arg : T, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 39, 52)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 39, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 39, 28)) >r : T, Symbol(r, Decl(subtypingWithConstructSignatures5.ts, 39, 70)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 39, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 39, 28)) a8: new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U; // ok >a8 : new (x: (arg: T) => U, y: (arg2: T) => U) => (r: T) => U, Symbol(a8, Decl(subtypingWithConstructSignatures5.ts, 39, 81)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 40, 13)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 40, 28)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >x : (arg: T) => U, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 40, 48)) >arg : T, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 40, 52)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 40, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 40, 28)) >y : (arg2: T) => U, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 40, 65)) >arg2 : T, Symbol(arg2, Decl(subtypingWithConstructSignatures5.ts, 40, 70)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 40, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 40, 28)) >r : T, Symbol(r, Decl(subtypingWithConstructSignatures5.ts, 40, 89)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 40, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 40, 28)) a9: new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number }) => U) => (r: T) => U; // ok, same as a8 with compatible object literal >a9 : new (x: (arg: T) => U, y: (arg2: { foo: string; bing: number; }) => U) => (r: T) => U, Symbol(a9, Decl(subtypingWithConstructSignatures5.ts, 40, 100)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 41, 13)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 41, 28)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >x : (arg: T) => U, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 41, 48)) >arg : T, Symbol(arg, Decl(subtypingWithConstructSignatures5.ts, 41, 52)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 41, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 41, 28)) >y : (arg2: { foo: string; bing: number; }) => U, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 41, 65)) >arg2 : { foo: string; bing: number; }, Symbol(arg2, Decl(subtypingWithConstructSignatures5.ts, 41, 70)) >foo : string, Symbol(foo, Decl(subtypingWithConstructSignatures5.ts, 41, 77)) >bing : number, Symbol(bing, Decl(subtypingWithConstructSignatures5.ts, 41, 90)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 41, 28)) >r : T, Symbol(r, Decl(subtypingWithConstructSignatures5.ts, 41, 117)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 41, 13)) >U : U, Symbol(U, Decl(subtypingWithConstructSignatures5.ts, 41, 28)) a10: new (...x: T[]) => T; // ok >a10 : new (...x: T[]) => T, Symbol(a10, Decl(subtypingWithConstructSignatures5.ts, 41, 128)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 42, 14)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >x : T[], Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 42, 33)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 42, 14)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 42, 14)) a11: new (x: T, y: T) => T; // ok >a11 : new (x: T, y: T) => T, Symbol(a11, Decl(subtypingWithConstructSignatures5.ts, 42, 49)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 43, 14)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >x : T, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 43, 30)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 43, 14)) >y : T, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 43, 35)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 43, 14)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 43, 14)) a12: new >(x: Array, y: T) => Array; // ok, less specific parameter type >a12 : new (x: Base[], y: T) => Derived[], Symbol(a12, Decl(subtypingWithConstructSignatures5.ts, 43, 47)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 44, 14)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >x : Base[], Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 44, 37)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : T, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 44, 52)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 44, 14)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a13: new >(x: Array, y: T) => T; // ok, T = Array, satisfies constraint, contextual signature instantiation succeeds >a13 : new (x: Base[], y: T) => T, Symbol(a13, Decl(subtypingWithConstructSignatures5.ts, 44, 77)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 45, 14)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Derived : Derived, Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >x : Base[], Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 45, 40)) >Array : T[], Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) >Base : Base, Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : T, Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 45, 55)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 45, 14)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 45, 14)) a14: new (x: { a: T; b: T }) => T; // ok, best common type yields T = {} but that's satisfactory for this signature >a14 : new (x: { a: T; b: T; }) => T, Symbol(a14, Decl(subtypingWithConstructSignatures5.ts, 45, 67)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 46, 14)) >x : { a: T; b: T; }, Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 46, 17)) >a : T, Symbol(a, Decl(subtypingWithConstructSignatures5.ts, 46, 21)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 46, 14)) >b : T, Symbol(b, Decl(subtypingWithConstructSignatures5.ts, 46, 27)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 46, 14)) >T : T, Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 46, 14)) }