-
Notifications
You must be signed in to change notification settings - Fork 7
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
Reassigning function parameters breaks function calls #234
Comments
This will be fixed by #222. This is a consequence of the current implementation of function inlining, which essentially replaces the parameters in the function body by the received values, generates the mlog code and then checks if it is short enough to inline. This means that for this code: function func(x: number) {
x = Math.floor(x)
return x
}
print(func(1))
printFlush() The compiler generates this internal function to see if the generated code is short enough to be inlined: function func__0() {
1 = Math.floor(1)
return 1
} And then it sees that |
gives
The operator '=' is not defined for [1].
expected something like:
because before it wasn't broken
The text was updated successfully, but these errors were encountered: