Undefined error when having a for-loop be unreachable code
Opened this issue · 1 comments
falkecarlsen commented
Turns out the following if-else-for.cell
program does not work:
world {
size = 100 [wrap], 200 [wrap];
tickrate = 1;
cellsize = 5;
}
state ident (0, 0, 0) {
become ident;
}
function f(int a) int {
if (a == 1) {
return a;
} else {
return a;
}
for (let x = a; x < a; x = x+1) {
let y = 2;
}
return a;
}
falkecarlsen commented
This happens in the type-checker and probably during flow-check.