fun test() {
var k : int;
let (a : arr[4] int) = {1,3,5,7};
k := 2;
while (k < length(a) && a[k] != 8) {
k := k + 1;
}
return k;
}
let comp main = read[int] >>> emit test() >>> write[int];
failed to compile with the following error (I presume from Edsko's static analyser):
user error (Program failure during evaluation: Out of boundsnoLoc)
The code is correct if we assume the usual precedence of conditions. The problem is in current master 120d726a5c
The following code:
failed to compile with the following error (I presume from Edsko's static analyser): user error (Program failure during evaluation: Out of boundsnoLoc)
The code is correct if we assume the usual precedence of conditions. The problem is in current master 120d726a5c