genericCallWithObjectTypeArgsAndIndexersErrors.ts(10,9): error TS2413: 'number' index type 'T' is not assignable to 'string' index type 'Object'.
genericCallWithObjectTypeArgsAndIndexersErrors.ts(12,18): error TS2454: Variable 'b' is used before being assigned.
genericCallWithObjectTypeArgsAndIndexersErrors.ts(20,18): error TS2454: Variable 'b' is used before being assigned.


==== genericCallWithObjectTypeArgsAndIndexersErrors.ts (3 errors) ====
    // Type inference infers from indexers in target type, error cases
    
    function foo<T>(x: T) {
        return x;
    }
    
    function other<T>(arg: T) {
        var b: {
            [x: string]: Object;
            [x: number]: T; // ok, T is a subtype of Object because its apparent type is {}
            ~~~~~~~~~~~~~~~
!!! error TS2413: 'number' index type 'T' is not assignable to 'string' index type 'Object'.
        };
        var r2 = foo(b); // T
                     ~
!!! error TS2454: Variable 'b' is used before being assigned.
    }
    
    function other3<T extends U, U extends Date>(arg: T) {
        var b: {
            [x: string]: Object;
            [x: number]: T;
        };
        var r2 = foo(b);
                     ~
!!! error TS2454: Variable 'b' is used before being assigned.
        var d = r2[1];
        var e = r2['1'];
        var u: U = r2[1]; // ok
    }