diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-06 14:15:55 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-06 14:15:55 -0400 |
| commit | 11fa4f548ca71baa96a9dba4aa9a24051de265d3 (patch) | |
| tree | 950a5142db5c5ec211229109d1fd7a1f04f14f4f /test | |
| parent | 7239ec4083128cc002ad8bd16824824d71b20116 (diff) | |
Support 'when' statements as expressions
Diffstat (limited to 'test')
| -rw-r--r-- | test/enums.tm | 8 |
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 + + |
