aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-12-21 15:13:26 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-12-21 15:13:26 -0500
commit325b367a1342826fe7174ce45cfab92091d4dbb5 (patch)
tree921b306025e495f71f008f9f9a4b1291ce2cdcb3 /test
parent478ddad9aaf837005f5401126f8872c0e3058bba (diff)
Support logical binary operators on optionals (promote to booleans)
Diffstat (limited to 'test')
-rw-r--r--test/optionals.tm5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/optionals.tm b/test/optionals.tm
index 2ccdf392..5aefedf4 100644
--- a/test/optionals.tm
+++ b/test/optionals.tm
@@ -326,3 +326,8 @@ func main():
>> [Struct(5,"A")?, Struct(6,"B"), Struct(7,"C")]
= [Struct(x=5, y="A"), Struct(x=6, y="B"), Struct(x=7, y="C")]
+
+ if 5? or no:
+ say("Binary op 'or' works with optionals")
+ else:
+ fail("Failed to do binary op 'or' on optional")