I discovered that the Array.tabulateVar
function loops over the index 0
twice. This unexpected behaviour may cause issues in developers’ code.
moc version: 0.10.1
Reproduce with:
Array.tabulateVar(5, func(i: Nat): Nat {
Debug.print(debug_show(i));
i;
});
0, 0, 1, 2, 3, 4, 5