aboutsummaryrefslogtreecommitdiff
path: root/test/enums.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-06 14:15:55 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-06 14:15:55 -0400
commit11fa4f548ca71baa96a9dba4aa9a24051de265d3 (patch)
tree950a5142db5c5ec211229109d1fd7a1f04f14f4f /test/enums.tm
parent7239ec4083128cc002ad8bd16824824d71b20116 (diff)
Support 'when' statements as expressions
Diffstat (limited to 'test/enums.tm')
-rw-r--r--test/enums.tm8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/enums.tm b/test/enums.tm
index f4af342d..98811408 100644
--- a/test/enums.tm
+++ b/test/enums.tm
@@ -66,4 +66,12 @@ func main():
while when cases[i] is One(x):
>> x
i += 1
+
+ >> expr := when cases[1] is One(y):
+ y + 1
+ else:
+ -1
+ = 2
+
+