=== tests/cases/conformance/expressions/functionCalls/callWithSpreadES6.ts ===

interface X {
>X : X

    foo(x: number, y: number, ...z: string[]);
>foo : (x: number, y: number, ...z: string[]) => any
>x : number
>y : number
>z : string[]
}

function foo(x: number, y: number, ...z: string[]) {
>foo : (x: number, y: number, ...z: string[]) => void
>x : number
>y : number
>z : string[]
}

var a: string[];
>a : string[]

var z: number[];
>z : number[]

var obj: X;
>obj : X
>X : X

var xa: X[];
>xa : X[]
>X : X

foo(1, 2, "abc");
>foo(1, 2, "abc") : void
>foo : (x: number, y: number, ...z: string[]) => void
>1 : number
>2 : number
>"abc" : string

foo(1, 2, ...a);
>foo(1, 2, ...a) : void
>foo : (x: number, y: number, ...z: string[]) => void
>1 : number
>2 : number
>...a : string
>a : string[]

foo(1, 2, ...a, "abc");
>foo(1, 2, ...a, "abc") : void
>foo : (x: number, y: number, ...z: string[]) => void
>1 : number
>2 : number
>...a : string
>a : string[]
>"abc" : string

obj.foo(1, 2, "abc");
>obj.foo(1, 2, "abc") : any
>obj.foo : (x: number, y: number, ...z: string[]) => any
>obj : X
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>"abc" : string

obj.foo(1, 2, ...a);
>obj.foo(1, 2, ...a) : any
>obj.foo : (x: number, y: number, ...z: string[]) => any
>obj : X
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>...a : string
>a : string[]

obj.foo(1, 2, ...a, "abc");
>obj.foo(1, 2, ...a, "abc") : any
>obj.foo : (x: number, y: number, ...z: string[]) => any
>obj : X
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>...a : string
>a : string[]
>"abc" : string

(obj.foo)(1, 2, "abc");
>(obj.foo)(1, 2, "abc") : any
>(obj.foo) : (x: number, y: number, ...z: string[]) => any
>obj.foo : (x: number, y: number, ...z: string[]) => any
>obj : X
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>"abc" : string

(obj.foo)(1, 2, ...a);
>(obj.foo)(1, 2, ...a) : any
>(obj.foo) : (x: number, y: number, ...z: string[]) => any
>obj.foo : (x: number, y: number, ...z: string[]) => any
>obj : X
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>...a : string
>a : string[]

(obj.foo)(1, 2, ...a, "abc");
>(obj.foo)(1, 2, ...a, "abc") : any
>(obj.foo) : (x: number, y: number, ...z: string[]) => any
>obj.foo : (x: number, y: number, ...z: string[]) => any
>obj : X
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>...a : string
>a : string[]
>"abc" : string

xa[1].foo(1, 2, "abc");
>xa[1].foo(1, 2, "abc") : any
>xa[1].foo : (x: number, y: number, ...z: string[]) => any
>xa[1] : X
>xa : X[]
>1 : number
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>"abc" : string

xa[1].foo(1, 2, ...a);
>xa[1].foo(1, 2, ...a) : any
>xa[1].foo : (x: number, y: number, ...z: string[]) => any
>xa[1] : X
>xa : X[]
>1 : number
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>...a : string
>a : string[]

xa[1].foo(1, 2, ...a, "abc");
>xa[1].foo(1, 2, ...a, "abc") : any
>xa[1].foo : (x: number, y: number, ...z: string[]) => any
>xa[1] : X
>xa : X[]
>1 : number
>foo : (x: number, y: number, ...z: string[]) => any
>1 : number
>2 : number
>...a : string
>a : string[]
>"abc" : string

(<Function>xa[1].foo)(...[1, 2, "abc"]);
>(<Function>xa[1].foo)(...[1, 2, "abc"]) : any
>(<Function>xa[1].foo) : Function
><Function>xa[1].foo : Function
>Function : Function
>xa[1].foo : (x: number, y: number, ...z: string[]) => any
>xa[1] : X
>xa : X[]
>1 : number
>foo : (x: number, y: number, ...z: string[]) => any
>...[1, 2, "abc"] : number | string
>[1, 2, "abc"] : (number | string)[]
>1 : number
>2 : number
>"abc" : string

class C {
>C : C

    constructor(x: number, y: number, ...z: string[]) {
>x : number
>y : number
>z : string[]

        this.foo(x, y);
>this.foo(x, y) : void
>this.foo : (x: number, y: number, ...z: string[]) => void
>this : this
>foo : (x: number, y: number, ...z: string[]) => void
>x : number
>y : number

        this.foo(x, y, ...z);
>this.foo(x, y, ...z) : void
>this.foo : (x: number, y: number, ...z: string[]) => void
>this : this
>foo : (x: number, y: number, ...z: string[]) => void
>x : number
>y : number
>...z : string
>z : string[]
    }
    foo(x: number, y: number, ...z: string[]) {
>foo : (x: number, y: number, ...z: string[]) => void
>x : number
>y : number
>z : string[]
    }
}

class D extends C {
>D : D
>C : C

    constructor() {
        super(1, 2);
>super(1, 2) : void
>super : typeof C
>1 : number
>2 : number

        super(1, 2, ...a);
>super(1, 2, ...a) : void
>super : typeof C
>1 : number
>2 : number
>...a : string
>a : string[]
    }
    foo() {
>foo : () => void

        super.foo(1, 2);
>super.foo(1, 2) : void
>super.foo : (x: number, y: number, ...z: string[]) => void
>super : C
>foo : (x: number, y: number, ...z: string[]) => void
>1 : number
>2 : number

        super.foo(1, 2, ...a);
>super.foo(1, 2, ...a) : void
>super.foo : (x: number, y: number, ...z: string[]) => void
>super : C
>foo : (x: number, y: number, ...z: string[]) => void
>1 : number
>2 : number
>...a : string
>a : string[]
    }
}

