A let
variable, initialized with a mutable variable behaves as an alias: it changes after change in the mutable variable: possible ssa regression
#2054
Labels
bug
Something isn't working
Aim
We were trying to make our closure reforms PR pass the old higher_order_functions tests, and it seemed it didn't work with the alias of a mutable variable case: however it seems it is because this behavior changed
a minimal example is
Expected Behavior
Bug
instead we get
and an
assert(z == 3)
passes instead:it seems, it worked as expected with the original ssa backend(tested before rebasing on a commit that drops it)
To Reproduce
write down a program like
and run it with
Installation Method
Compiled from source
Nargo Version
nargo 0.9.0 (git version hash: 0189e270bc6c15c26d3197400e76ef74ec285c6a, is dirty: true)
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: