diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-23 12:40:21 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-23 12:40:21 -0400 |
| commit | fba2b99b65d5023675a3f270adbc87ef0b0ede8f (patch) | |
| tree | c1af45c5b80c9813a48fcc25386f331786004c73 /test/enums.tm | |
| parent | 7a741e65e663d9ce9013691d2479c6fdba4b798b (diff) | |
Support 'while when'
Diffstat (limited to 'test/enums.tm')
| -rw-r--r-- | test/enums.tm | 6 |
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 + |
