Lua development version has made loop variables read-only in lua/lua@b2f7b3b so having a warning for this would be good so that those cases could be found early.
E.g. code like
for i = 1, 10 do
i = i - 1
end
for k,v in pairs({ foo = "bar" }) do
k = "k:"..k
end
Fails with attempt to assign to const variable 'i'
Lua development version has made loop variables read-only in lua/lua@b2f7b3b so having a warning for this would be good so that those cases could be found early.
E.g. code like
Fails with
attempt to assign to const variable 'i'