Skip to content

table pack not the corect. #70

@7aGiven

Description

@7aGiven
function a()
    return 1, 2, 3, 4, 5, 6
end
b = {
    a()
}
for k, v in pairs(b) do
    print(k, v)
end

parse above code and toLua below

function a()
    return 1, 2, 3, 4, 5, 6
end
b = {
    [1] = a(),
}
for k, v in pairs(b) do
    print(k, v)
end

for first cmd output

1       1
2       2
3       3
4       4
5       5
6       6

for second cmd output

1       1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions