==== tests/cases/compiler/arrayLiteralContextualType.ts (4 errors) ====
    interface IAnimal {
        name: string;
    }
    
    class Giraffe {
        name = "Giraffe";
        neckLength = "3m";
    }
    
    class Elephant {
        name = "Elephant";
        trunkDiameter = "20cm";
    }
    
    function foo(animals: IAnimal[]) { }
    function bar(animals: { [n: number]: IAnimal }) { }
    
    foo([
        new Giraffe(),
        new Elephant()
    ]); // Legal because of the contextual type IAnimal provided by the parameter
    bar([
        new Giraffe(),
        new Elephant()
    ]); // Legal because of the contextual type IAnimal provided by the parameter
    
    var arr = [new Giraffe(), new Elephant()];
    foo(arr); // Error because of no contextual type
    ~~~
!!! arrayLiteralContextualType.ts(28,1): error TS2082: Supplied parameters do not match any signature of call target:
!!! 	Types of property 'pop' of types '{}[]' and 'IAnimal[]' are incompatible:
!!! 		Call signatures of types '() => {}' and '() => IAnimal' are incompatible:
!!! 			Type '{}' is missing property 'name' from type 'IAnimal'.
    ~~~
!!! arrayLiteralContextualType.ts(28,1): error TS2087: Could not select overload for 'call' expression.
    bar(arr); // Error because of no contextual type
    ~~~
!!! arrayLiteralContextualType.ts(29,1): error TS2082: Supplied parameters do not match any signature of call target:
!!! 	Index signatures of types '{}[]' and '{ [n: number]: IAnimal; }' are incompatible:
!!! 		Type '{}' is missing property 'name' from type 'IAnimal'.
    ~~~
!!! arrayLiteralContextualType.ts(29,1): error TS2087: Could not select overload for 'call' expression.