tests/cases/compiler/indexerConstraints2.ts(9,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'.
tests/cases/compiler/indexerConstraints2.ts(17,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'.
tests/cases/compiler/indexerConstraints2.ts(26,5): error TS2413: Numeric index type 'A' is not assignable to string index type 'B'.
tests/cases/compiler/indexerConstraints2.ts(34,6): error TS1336: An index signature parameter type cannot be a type alias. Consider writing '[n: number]: A' instead.
tests/cases/compiler/indexerConstraints2.ts(40,6): error TS1336: An index signature parameter type cannot be a type alias. Consider writing '[s: string]: A' instead.
tests/cases/compiler/indexerConstraints2.ts(46,6): error TS1023: An index signature parameter type must be 'string' or 'number'.
tests/cases/compiler/indexerConstraints2.ts(52,6): error TS1337: An index signature parameter type cannot be a union type. Consider using a mapped object type instead.
tests/cases/compiler/indexerConstraints2.ts(58,6): error TS1023: An index signature parameter type must be 'string' or 'number'.
tests/cases/compiler/indexerConstraints2.ts(64,6): error TS1023: An index signature parameter type must be 'string' or 'number'.
tests/cases/compiler/indexerConstraints2.ts(70,6): error TS1023: An index signature parameter type must be 'string' or 'number'.
tests/cases/compiler/indexerConstraints2.ts(74,6): error TS1337: An index signature parameter type cannot be a union type. Consider using a mapped object type instead.


==== tests/cases/compiler/indexerConstraints2.ts (11 errors) ====
    class A { a: number; }
    class B extends A { b: number; }
    
    // Inheritance
    class F {
        [s: string]: B
    }
    class G extends F {
        [n: number]: A
        ~~~~~~~~~~~~~~
!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'.
    }
    
    // Other way
    class H {
        [n: number]: A
    }
    class I extends H {
        [s: string]: B
        ~~~~~~~~~~~~~~
!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'.
    }
    
    // With hidden indexer
    class J {
        [n: number]: {}
    }
    
    class K extends J {
        [n: number]: A;
        ~~~~~~~~~~~~~~~
!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'.
        [s: string]: B;
    }
    
    
    type AliasedNumber = number;
    
    interface L {
        [n: AliasedNumber]: A;
         ~
!!! error TS1336: An index signature parameter type cannot be a type alias. Consider writing '[n: number]: A' instead.
    }
    
    type AliasedString = string;
    
    interface M {
        [s: AliasedString]: A;
         ~
!!! error TS1336: An index signature parameter type cannot be a type alias. Consider writing '[s: string]: A' instead.
    }
    
    type AliasedBoolean = boolean;
    
    interface N {
        [b: AliasedBoolean]: A;
         ~
!!! error TS1023: An index signature parameter type must be 'string' or 'number'.
    }
    
    type IndexableUnion = "foo" | "bar";
    
    interface O {
        [u: IndexableUnion]: A;
         ~
!!! error TS1337: An index signature parameter type cannot be a union type. Consider using a mapped object type instead.
    }
    
    type NonIndexableUnion = boolean | {};
    
    interface P {
        [u: NonIndexableUnion]: A;
         ~
!!! error TS1023: An index signature parameter type must be 'string' or 'number'.
    }
    
    type NonIndexableUnion2 = string | number;
    
    interface Q {
        [u: NonIndexableUnion2]: A;
         ~
!!! error TS1023: An index signature parameter type must be 'string' or 'number'.
    }
    
    type NonIndexableUnion3 = "foo" | 42;
    
    interface R {
        [u: NonIndexableUnion3]: A;
         ~
!!! error TS1023: An index signature parameter type must be 'string' or 'number'.
    }
    
    interface S {
        [u: "foo" | "bar"]: A;
         ~
!!! error TS1337: An index signature parameter type cannot be a union type. Consider using a mapped object type instead.
    }