aboutsummaryrefslogtreecommitdiff
path: root/test/enums.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-23 12:40:21 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-23 12:40:21 -0400
commitfba2b99b65d5023675a3f270adbc87ef0b0ede8f (patch)
treec1af45c5b80c9813a48fcc25386f331786004c73 /test/enums.tm
parent7a741e65e663d9ce9013691d2479c6fdba4b798b (diff)
Support 'while when'
Diffstat (limited to 'test/enums.tm')
-rw-r--r--test/enums.tm6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/enums.tm b/test/enums.tm
index 9f700410..553fcf84 100644
--- a/test/enums.tm
+++ b/test/enums.tm
@@ -55,3 +55,9 @@ func main():
>> choose_text(Foo.Last("XX"))
= "else: Foo.Last(t=\"XX\")"
+ i := 1
+ cases := [Foo.One(1), Foo.One(2), Foo.Zero]
+ while when cases[i] is One(x):
+ >> x
+ i += 1
+