-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SparseArray code generated for simple array spreads #1425
Labels
Comments
This is intended behavior to deal with Lua behavior when using an unpack as an array literal member before the last element. ie: local a = { 1, 2, 3 }
local b = { 4, 5, 6 }
return { table.unpack(a), table.unpack(b) } Will unexpectedly return While this will functionally work and result in the correct result, there are two issues with this:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://typescripttolua.github.io/play#code/NoOjwXQGgAjFISA
This code uses lualib sparse arrays, even though there shouldn't be any need to, since arrays with nulls are not supported anyway. This might have a considerable impact on performance in hot loops.
The text was updated successfully, but these errors were encountered: