-
Notifications
You must be signed in to change notification settings - Fork 469
Recursive function with no parameters generate while loop which contains assignment to undeclared _param
variable
#6719
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
Comments
Any plan to fix this bug? |
The biggest problem I see with this is that it will silently freeze instead of overflow the stack... |
I came across this while upgrading my project to ReScript 11 and considering a swap to uncurried mode. The specific issue is with code that takes a JS generator and turns it into a "lazy sequence". In my case, the project still has |
Likely place to start from: #6131 |
@hackwaly @TheSpyder how does this look? #6907 |
The JS certainly looks good! I didn't realise there was broken code in the expected test output 😂 |
Improved the PR, now it simply omits the problematic assignment without reverting to using a spurious parameter in the case of recursive functions. |
That happens often. There are so many old and forgotten tests, that chances are the repro is already right there. |
Yes, I have worked on many old codebases where that's true 🙃 |
Thank you for filing! Check list:
Recursive function with no parameters generate while loop which contains assignment to undeclared
_param
variableThe text was updated successfully, but these errors were encountered: