You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please, before submitting a new issue, verify the following:
You have tested it on latest Nelua version from master branch.
You have checked that there is no similar feature already implemented or requested.
Feature motivation
It's known that Nelua does not support closures. Once you had a closure in your code, Nelua will complain about that it can't handle closures.
test.nelua:10:5: from: AST node Block
return x
^~~~~~~~
test.nelua:10:12: error: attempt to access upvalue 'x', but closures are not supported
return x
Feature description
But with records, we can somewhat implement a type of closure in Nelua.
WARNING: Please, read this note carefully before submitting a feature request:
It is important to realize that this is NOT A SUPPORT FORUM, this is for ISSUES ONLY.
If you need support, have questions, ideas to discuss you should use
the Nelua Discussions forum or
the Nelua Discord server.
Please, before submitting a new issue, verify the following:
Feature motivation
It's known that Nelua does not support closures. Once you had a closure in your code, Nelua will complain about that it can't handle closures.
Feature description
But with records, we can somewhat implement a type of closure in Nelua.
So if you have a function with closure like this.
Nelua should generate the following code as this.
And then will use
closure.closure
as closure when it's returned from function.Code example
Provide minimal code example for the feature.
Please, format the code properly and try to keep it as simple as possible, just focusing on the feature.
Will generate a code (in C but this is explained in Nelua).
Describe alternatives you've considered
A clear and concise description of any alternative solutions you've considered.
The text was updated successfully, but these errors were encountered: