==== tests/cases/compiler/numericIndexerConstrainsPropertyDeclarations2.ts (7 errors) ====
    // String indexer providing a constraint of a user defined type
    
    class A {
        foo(): string { return ''; }
    }
    
    class B extends A {
        bar(): string { return ''; }
    }
    
    class Foo {
        [x: number]: A;
        1.0: A; // ok
        2.0: B; // ok
        "2.5": B // ok
        3.0: number; // error
        ~~~~~~~~~~~~
!!! numericIndexerConstrainsPropertyDeclarations2.ts(16,5): error TS2170: All numerically named properties must be assignable to numeric indexer type 'A':
!!! 	Type 'Number' is missing property 'foo' from type 'A'.
        "4.0": string; // error
        ~~~~~~~~~~~~~~
!!! numericIndexerConstrainsPropertyDeclarations2.ts(17,5): error TS2170: All numerically named properties must be assignable to numeric indexer type 'A':
!!! 	Type 'String' is missing property 'foo' from type 'A'.
    }
    
    interface Foo2 {
        [x: number]: A;
        1.0: A; // ok
        2.0: B; // ok
        "2.5": B // ok
        3.0: number; // error
        ~~~~~~~~~~~
!!! numericIndexerConstrainsPropertyDeclarations2.ts(25,5): error TS2170: All numerically named properties must be assignable to numeric indexer type 'A':
!!! 	Type 'Number' is missing property 'foo' from type 'A'.
        "4.0": string; // error
        ~~~~~~~~~~~~~
!!! numericIndexerConstrainsPropertyDeclarations2.ts(26,5): error TS2170: All numerically named properties must be assignable to numeric indexer type 'A':
!!! 	Type 'String' is missing property 'foo' from type 'A'.
    }
    
    var a: {
        [x: number]: A;
        1.0: A; // ok
        2.0: B; // ok
        "2.5": B // ok
        3.0: number; // error
        ~~~~~~~~~~~
!!! numericIndexerConstrainsPropertyDeclarations2.ts(34,5): error TS2170: All numerically named properties must be assignable to numeric indexer type 'A':
!!! 	Type 'Number' is missing property 'foo' from type 'A'.
        "4.0": string; // error
        ~~~~~~~~~~~~~
!!! numericIndexerConstrainsPropertyDeclarations2.ts(35,5): error TS2170: All numerically named properties must be assignable to numeric indexer type 'A':
!!! 	Type 'String' is missing property 'foo' from type 'A'.
    };
    
    // error
    var b: { [x: number]: A } = {
        ~~~~~~~~~~~~~~~~~~~~~~~~~
        1.0: new A(), 
    ~~~~~~~~~~~~~~~~~~
        2.0: new B(), 
    ~~~~~~~~~~~~~~~~~~
        "2.5": new B(),
    ~~~~~~~~~~~~~~~~~~~
        3.0: 1,
    ~~~~~~~~~~~
        "4.0": ''
    ~~~~~~~~~~~~~
    }
    ~
!!! numericIndexerConstrainsPropertyDeclarations2.ts(39,5): error TS2012: Cannot convert '{ 1.0: A; 2.0: B; "2.5": B; 3.0: number; "4.0": string; [x: number]: {}; }' to '{ [x: number]: A; }':
!!! 	Index signatures of types '{ 1.0: A; 2.0: B; "2.5": B; 3.0: number; "4.0": string; [x: number]: {}; }' and '{ [x: number]: A; }' are incompatible:
!!! 		Type '{}' is missing property 'foo' from type 'A'.