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