I noticed that for loop variables are not recognized as being locals when they are the target of assignments.
To illustrate, the following moonscript:
for k,v in ipairs t
v = v .. 'foo'
Transpiles down to:
for k, v in ipairs(t) do
local v = v .. 'foo'
end
When I would have expected the following Lua output:
for k, v in ipairs(t) do
v = v .. 'foo'
end