We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Take the simple example:
function make_addr(a) return function(b) return (a + b) end end -- should print 35 print(make_addr(15)(20)) addten = make_addr(10) -- should print 104 print(addten(94))
Running in with the regular lua interpreter the program outputs:
35 104
however when using cargo run -- closure.lua the result is:
cargo run -- closure.lua
40 188
I think this is because each chunk does not store its own locals
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Take the simple example:
Running in with the regular lua interpreter the program outputs:
however when using
cargo run -- closure.lua
the result is:I think this is because each chunk does not store its own locals
The text was updated successfully, but these errors were encountered: