made and and or operators short circuits

This commit is contained in:
cozis
2022-08-13 23:37:22 +02:00
parent 8565722bab
commit d24877c5f3
9 changed files with 240 additions and 120 deletions
+7
View File
@@ -69,6 +69,13 @@
assert((false or false) == false);
}
# Test short-circuitness of the logical operators
{
# The assertions shouldn't trigger.
true or assert(false);
false and assert(false);
}
# Test lists.
{
[1]; [1.0]; ['x']; [1, 1]; [1.0, 1.0]; ['x', 'x'];