X Tutup
Skip to content

Using spread syntax in function calls on not last position leaves only single value #819

@ark120202

Description

@ark120202

Playground

Input:

const array = [1, 2, 3];
console.log(...array, 4);

Current Result:

local array = {1, 2, 3}
print(
    table.unpack(array),
    4
)

Expected Result:

local array = {1, 2, 3}
print(
    table.unpack(
        {
            table.unpack(array),
            4
        }
    )
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup