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

handle a special case of variable shadowing #178

Merged
merged 2 commits into from Jun 23, 2022
Merged

handle a special case of variable shadowing #178

merged 2 commits into from Jun 23, 2022

Conversation

tiye
Copy link
Member

@tiye tiye commented Jun 21, 2022

for a case like:

; "a special case variable shadowing of `b`"
let
    b -1
    a $ loop
        xs $ []
        b 0
      if (>= b 5) xs
        recur (conj xs b) (inc b)
  assert= a $ [] 0 1 2 3 4
  assert= b -1

where b is defined both outside and inside, which reused the return_label of loop recursion. but actually it does not forward value, it only returns. the outer context should be unaware for code in bind function.

@tiye tiye requested a review from a team June 21, 2022 06:17
@NoEgAm NoEgAm merged commit 09ffad4 into main Jun 23, 2022
@NoEgAm NoEgAm deleted the shadow-let branch June 23, 2022 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants