aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/optionals.tm28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/optionals.tm b/test/optionals.tm
index 6d7db835..ced42274 100644
--- a/test/optionals.tm
+++ b/test/optionals.tm
@@ -284,3 +284,31 @@ func main():
= {!Int}
>> [5?, !Int, !Int, 6?]:sorted()
= [!Int, !Int, 5?, 6?]
+
+ do:
+ >> value := if var := 5?:
+ var
+ else:
+ 0
+ = 5
+
+ do:
+ >> value := if var := !Int:
+ var
+ else:
+ 0
+ = 0
+
+ do:
+ >> opt := 5?
+ >> if opt:
+ >> opt
+ else:
+ >> opt
+
+ do:
+ >> opt := !Int
+ >> if opt:
+ >> opt
+ else:
+ >> opt