Fixed a post-fix increment issue, highlighted in the game engine

This commit is contained in:
2023-06-20 13:54:21 +10:00
parent f6ec6a8c73
commit 0e41b00ef4
5 changed files with 32 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
var a = 0;
if (a++ >= 1) {
assert false, "increment postfix bugfix failed (first check)";
}
if (a++ >= 1) {
}
assert a == 2, "increment postfix bugfix failed (second check)";
print "All good";