mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-17 15:54:07 +10:00
Added short-circuiting support to && and ||
This commit is contained in:
9
test/scripts/short-circuiting-support.toy
Normal file
9
test/scripts/short-circuiting-support.toy
Normal file
@@ -0,0 +1,9 @@
|
||||
//explicitly support && and || short circuits
|
||||
|
||||
assert 1 && 2 == 2, "&& short-circuit failed";
|
||||
|
||||
assert 1 || 2 == 1, "|| short-circuit failed";
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user