Optimizer does not maintain scoping in case of if(1)
foul11 opened this issue · 2 comments
foul11 commented
local X = 1
if (1) {
local X = X + 1
print(X) -- printed '2'
}
print(X) -- printed '2'
local X = 1
if (X) {
local X = X + 1
print(X) -- printed '2'
}
print(X) -- printed '1'
Vurv78 commented
Probably thanks to the optimizer, which is being removed in #2555, considering the bottom one works but the top doesn't.
Vurv78 commented
Yeah this is already a test in the new compiler. So this is fixed by it.
wire/data/expression2/tests/runtime/base/scoping.txt
Lines 3 to 10 in 150e6c4