-
Notifications
You must be signed in to change notification settings - Fork 57
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
Warn of mutated loop variables #109
Comments
Similarly, a warning when trying to explicitly assign to a const variable in 5.4. local foo <const> = 5
foo = 6 -- should generate warning |
Contributions welcome. I don't have a lot of time to develop this myself right now but I mostly keep up with facilitating community contributions. |
@asherber While the implementation might share some code, the |
Done: #116 |
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'
The text was updated successfully, but these errors were encountered: