Closed lortonx closed 3 months ago
The compiler considers "i" to be one variable, not two, and an infinite loop occurs.
run
for(let i = 0; i < 30; i++) { let i = 10 while(i--) {} }
0.27.15
That does seem to be the case...
Actually, a separate local variable is created, but it shadows the first one. See here. Lines 36-39 would be the i++, which is writing to local 1 instead of local 0.
i++
Bug description
The compiler considers "i" to be one variable, not two, and an infinite loop occurs.
Steps to reproduce
run
AssemblyScript version
0.27.15