tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(45,9): error TS2322: Type '(x: number) => string[]' is not assignable to type '<T, U>(x: T) => U[]'.
  Types of parameters 'x' and 'x' are incompatible.
    Type 'T' is not assignable to type 'number'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(49,9): error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type '<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V'.
  Types of parameters 'x' and 'x' are incompatible.
    Types of parameters 'arg' and 'arg' are incompatible.
      Type 'Base' is not assignable to type 'T'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
  Types of parameters 'y' and 'y' are incompatible.
    Types of parameters 'arg2' and 'arg2' are incompatible.
      Type '{ foo: number; }' is not assignable to type 'Base'.
        Types of property 'foo' are incompatible.
          Type 'number' is not assignable to type 'string'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
  Types of parameters 'x' and 'x' are incompatible.
    Types of parameters 'arg' and 'arg' are incompatible.
      Type 'Base' is not assignable to type 'T'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(58,9): error TS2322: Type '(...x: Base[]) => Base' is not assignable to type '<T extends Derived>(...x: T[]) => T'.
  Type 'Base' is not assignable to type 'T'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(62,9): error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '<T extends Derived>(x: T, y: T) => T'.
  Type 'Base' is not assignable to type 'T'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(66,9): error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '<T extends Derived2[]>(x: Base[], y: Base[]) => T'.
  Type 'Derived[]' is not assignable to type 'T'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(69,9): error TS2322: Type '<T>(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'.
  Type 'string | number' is not assignable to type 'number'.
    Type 'string' is not assignable to type 'number'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(70,9): error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '<T>(x: { a: T; b: T; }) => T'.
  Types of parameters 'x' and 'x' are incompatible.
    Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'.
      Types of property 'a' are incompatible.
        Type 'T' is not assignable to type 'string'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(73,9): error TS2322: Type '<T extends Base>(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'.
  Types of parameters 'x' and 'x' are incompatible.
    Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'.
      Types of property 'a' are incompatible.
        Type 'string' is not assignable to type 'Base'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(74,9): error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '<T extends Base>(x: { a: T; b: T; }) => number'.
  Types of parameters 'x' and 'x' are incompatible.
    Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'.
      Types of property 'a' are incompatible.
        Type 'T' is not assignable to type 'string'.
          Type 'Base' is not assignable to type 'string'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(89,9): error TS2322: Type '<T>(x: T) => string[]' is not assignable to type '<T>(x: T) => T[]'.
  Type 'string[]' is not assignable to type 'T[]'.
    Type 'string' is not assignable to type 'T'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(90,9): error TS2322: Type '<T>(x: T) => T[]' is not assignable to type '<T>(x: T) => string[]'.
  Type 'T[]' is not assignable to type 'string[]'.
    Type 'T' is not assignable to type 'string'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(95,9): error TS2322: Type '<T>(x: T) => T[]' is not assignable to type '<T>(x: T) => string[]'.
  Type 'T[]' is not assignable to type 'string[]'.
    Type 'T' is not assignable to type 'string'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '<T>(x: T) => string[]' is not assignable to type '<T>(x: T) => T[]'.
  Type 'string[]' is not assignable to type 'T[]'.
    Type 'string' is not assignable to type 'T'.


==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts (15 errors) ====
    // These are mostly permitted with the current loose rules. All ok unless otherwise noted.
    
    module Errors {
        class Base { foo: string; }
        class Derived extends Base { bar: string; }
        class Derived2 extends Derived { baz: string; }
        class OtherDerived extends Base { bing: string; }
    
        module WithNonGenericSignaturesInBaseType {
            // target type with non-generic call signatures
            var a2: (x: number) => string[];
            var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2;
            var a8: (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived;
            var a10: (...x: Base[]) => Base;
            var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base;
            var a12: (x: Array<Base>, y: Array<Derived2>) => Array<Derived>;
            var a14: {
                    (x: number): number[];
                    (x: string): string[];
                };
            var a15: (x: { a: string; b: number }) => number;
            var a16: {
                    (x: {
                        (a: number): number;
                        (a?: number): number;
                    }): number[];
                    (x: {
                        (a: boolean): boolean;
                        (a?: boolean): boolean;
                    }): boolean[];
                };
            var a17: {
                    (x: {
                        <T extends Derived>(a: T): T;
                        <T extends Base>(a: T): T;
                    }): any[];
                    (x: {
                        <T extends Derived2>(a: T): T;
                        <T extends Base>(a: T): T;
                    }): any[];
                };
    
            var b2: <T, U>(x: T) => U[]; 
            a2 = b2;
            b2 = a2;
            ~~
!!! error TS2322: Type '(x: number) => string[]' is not assignable to type '<T, U>(x: T) => U[]'.
!!! error TS2322:   Types of parameters 'x' and 'x' are incompatible.
!!! error TS2322:     Type 'T' is not assignable to type 'number'.
    
            var b7: <T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V;
            a7 = b7;
            b7 = a7;
            ~~
!!! error TS2322: Type '(x: (arg: Base) => Derived) => (r: Base) => Derived2' is not assignable to type '<T extends Base, U extends Derived, V extends Derived2>(x: (arg: T) => U) => (r: T) => V'.
!!! error TS2322:   Types of parameters 'x' and 'x' are incompatible.
!!! error TS2322:     Types of parameters 'arg' and 'arg' are incompatible.
!!! error TS2322:       Type 'Base' is not assignable to type 'T'.
    
            var b8: <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; 
            a8 = b8; // error, { foo: number } and Base are incompatible
            ~~
!!! error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
!!! error TS2322:   Types of parameters 'y' and 'y' are incompatible.
!!! error TS2322:     Types of parameters 'arg2' and 'arg2' are incompatible.
!!! error TS2322:       Type '{ foo: number; }' is not assignable to type 'Base'.
!!! error TS2322:         Types of property 'foo' are incompatible.
!!! error TS2322:           Type 'number' is not assignable to type 'string'.
            b8 = a8; // error, { foo: number } and Base are incompatible
            ~~
!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
!!! error TS2322:   Types of parameters 'x' and 'x' are incompatible.
!!! error TS2322:     Types of parameters 'arg' and 'arg' are incompatible.
!!! error TS2322:       Type 'Base' is not assignable to type 'T'.
    
            
            var b10: <T extends Derived>(...x: T[]) => T; 
            a10 = b10;
            b10 = a10;
            ~~~
!!! error TS2322: Type '(...x: Base[]) => Base' is not assignable to type '<T extends Derived>(...x: T[]) => T'.
!!! error TS2322:   Type 'Base' is not assignable to type 'T'.
    
            var b11: <T extends Derived>(x: T, y: T) => T; 
            a11 = b11;
            b11 = a11;
            ~~~
!!! error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '<T extends Derived>(x: T, y: T) => T'.
!!! error TS2322:   Type 'Base' is not assignable to type 'T'.
    
            var b12: <T extends Array<Derived2>>(x: Array<Base>, y: Array<Base>) => T; 
            a12 = b12;
            b12 = a12;
            ~~~
!!! error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '<T extends Derived2[]>(x: Base[], y: Base[]) => T'.
!!! error TS2322:   Type 'Derived[]' is not assignable to type 'T'.
    
            var b15: <T>(x: { a: T; b: T }) => T; 
            a15 = b15;
            ~~~
!!! error TS2322: Type '<T>(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'.
!!! error TS2322:   Type 'string | number' is not assignable to type 'number'.
!!! error TS2322:     Type 'string' is not assignable to type 'number'.
            b15 = a15;
            ~~~
!!! error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '<T>(x: { a: T; b: T; }) => T'.
!!! error TS2322:   Types of parameters 'x' and 'x' are incompatible.
!!! error TS2322:     Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'.
!!! error TS2322:       Types of property 'a' are incompatible.
!!! error TS2322:         Type 'T' is not assignable to type 'string'.
    
            var b15a: <T extends Base>(x: { a: T; b: T }) => number; 
            a15 = b15a;
            ~~~
!!! error TS2322: Type '<T extends Base>(x: { a: T; b: T; }) => number' is not assignable to type '(x: { a: string; b: number; }) => number'.
!!! error TS2322:   Types of parameters 'x' and 'x' are incompatible.
!!! error TS2322:     Type '{ a: string; b: number; }' is not assignable to type '{ a: Base; b: Base; }'.
!!! error TS2322:       Types of property 'a' are incompatible.
!!! error TS2322:         Type 'string' is not assignable to type 'Base'.
            b15a = a15;
            ~~~~
!!! error TS2322: Type '(x: { a: string; b: number; }) => number' is not assignable to type '<T extends Base>(x: { a: T; b: T; }) => number'.
!!! error TS2322:   Types of parameters 'x' and 'x' are incompatible.
!!! error TS2322:     Type '{ a: T; b: T; }' is not assignable to type '{ a: string; b: number; }'.
!!! error TS2322:       Types of property 'a' are incompatible.
!!! error TS2322:         Type 'T' is not assignable to type 'string'.
!!! error TS2322:           Type 'Base' is not assignable to type 'string'.
    
            var b16: <T>(x: (a: T) => T) => T[];
            a16 = b16;
            b16 = a16;
    
            var b17: <T>(x: (a: T) => T) => any[];
            a17 = b17;
            b17 = a17;
        }
    
        module WithGenericSignaturesInBaseType {
            // target type has generic call signature
            var a2: <T>(x: T) => T[];
            var b2: <T>(x: T) => string[];
            a2 = b2;
            ~~
!!! error TS2322: Type '<T>(x: T) => string[]' is not assignable to type '<T>(x: T) => T[]'.
!!! error TS2322:   Type 'string[]' is not assignable to type 'T[]'.
!!! error TS2322:     Type 'string' is not assignable to type 'T'.
            b2 = a2;
            ~~
!!! error TS2322: Type '<T>(x: T) => T[]' is not assignable to type '<T>(x: T) => string[]'.
!!! error TS2322:   Type 'T[]' is not assignable to type 'string[]'.
!!! error TS2322:     Type 'T' is not assignable to type 'string'.
    
            // target type has generic call signature
            var a3: <T>(x: T) => string[];
            var b3: <T>(x: T) => T[]; 
            a3 = b3;
            ~~
!!! error TS2322: Type '<T>(x: T) => T[]' is not assignable to type '<T>(x: T) => string[]'.
!!! error TS2322:   Type 'T[]' is not assignable to type 'string[]'.
!!! error TS2322:     Type 'T' is not assignable to type 'string'.
            b3 = a3;
            ~~
!!! error TS2322: Type '<T>(x: T) => string[]' is not assignable to type '<T>(x: T) => T[]'.
!!! error TS2322:   Type 'string[]' is not assignable to type 'T[]'.
!!! error TS2322:     Type 'string' is not assignable to type 'T'.
        }
    }