Skip to content
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

Variable in a function does not change its name in AIR when called from a loop #499

Closed
DieMyst opened this issue Apr 25, 2022 · 0 comments · Fixed by #500
Closed

Variable in a function does not change its name in AIR when called from a loop #499

DieMyst opened this issue Apr 25, 2022 · 0 comments · Fixed by #500
Assignees
Labels
bug Something isn't working

Comments

@DieMyst
Copy link
Member

DieMyst commented Apr 25, 2022

Aqua:

func to_i_64(i: u32) -> i64:
  <- i

func iterate():
    num = 5
    for i <- ["a", "b"]:
        ali64 <- to_i_64(num)
        Console.print(ali64)

AIR:

...
                    (fold array-inline-0 i
                      (seq
                       (call %init_peer_id% ("run-console" "print") [i])
                       (next i)
                      )
                     )
...
@DieMyst DieMyst added the bug Something isn't working label Apr 25, 2022
@DieMyst DieMyst self-assigned this Apr 25, 2022
DieMyst added a commit that referenced this issue Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant