Incorrect behaviour when capturing var and changing it in a loop #5609
Labels
kind:bug
A bug in the code. Does not apply to documentation, specs, etc.
topic:compiler:semantic
topic:compiler
Crystal 0.24.1
Output:
The problem is that we only bind the variable to the metavariable if it's a closured var on a first pass, but the first read of
x
happens before we determine it's a closure.I found this while thinking about how to fix #4359
The text was updated successfully, but these errors were encountered: