Found a compiler bug, thanks Aedan!

This commit is contained in:
2023-03-17 14:01:16 +11:00
parent 4b83f1f0d6
commit 2edfbbe3ef
4 changed files with 82 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
var days = [
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday"
];
var rng = 10; //for chosen at random
var index = rng % days.length();
assert index == 3, "dot modulo bugfix failed";
rng %= days.length();
assert rng == 3, "dot modulo assign bugfix failed";
print "All good";

View File

@@ -114,6 +114,7 @@ int main() {
"dot-and-matrix.toy",
"dot-assignments-bugfix.toy",
"dot-chaining.toy",
"dot-modulo-bugfix.toy",
"dottify-bugfix.toy",
"functions.toy",
"index-arrays.toy",