mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Fixed a post-fix increment issue, highlighted in the game engine
This commit is contained in:
15
test/scripts/increment-postfix-bugfix.toy
Normal file
15
test/scripts/increment-postfix-bugfix.toy
Normal 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";
|
||||
@@ -119,6 +119,7 @@ int main() {
|
||||
"dottify-bugfix.toy",
|
||||
"function-within-function-bugfix.toy",
|
||||
"functions.toy",
|
||||
"increment-postfix-bugfix.toy",
|
||||
"index-arrays.toy",
|
||||
"index-assignment-both-bugfix.toy",
|
||||
"index-assignment-intermediate-bugfix.toy",
|
||||
|
||||
Reference in New Issue
Block a user