1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-15 07:47:40 +00:00

Harden semantics for and and or macros.

There was perviously a bit of fuzziness on returning false/nil
from these macros that has been removed.
This commit is contained in:
Calvin Rose
2020-03-06 08:36:21 -06:00
parent fbe8998ca8
commit 6123c41f13
2 changed files with 17 additions and 8 deletions

View File

@@ -107,4 +107,9 @@
(assert (= nil (match [1 2] [a b c] a)) "match 4")
(assert (= 2 (match [1 2] [a b] b)) "match 5")
# And/or checks
(assert (= false (and false false)) "and 1")
(assert (= false (or false false)) "or 1")
(end-suite)