In the code below, the function log should be executed for 5 times, and the sentence res is "0x00000000" should be printed for 5 times. However, such sentence is only printed once during the runtime.
def main() -> u32 {
u32 res = 0;
for u32 i in 0..5 {
log("res is {}", res);
}
return res;
}
Expected result:
...
res is "0x00000000"
res is "0x00000000"
res is "0x00000000"
res is "0x00000000"
res is "0x00000000"
...
Environment
Compiler version: 0.8.7
Operating system: Ubuntu 22.04
Steps to Reproduce
Save the buggy code into buggy.zok. Run the following commands from CLI:
Description
In the code below, the function
log
should be executed for 5 times, and the sentenceres is "0x00000000"
should be printed for 5 times. However, such sentence is only printed once during the runtime.Expected result:
Environment
Steps to Reproduce
Save the buggy code into
buggy.zok
. Run the following commands from CLI:You would see the following output, which is different from the expected result shown before.