diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-10 16:03:41 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-10 16:03:41 -0400 |
| commit | b37bd70b602b7ac6427dcf29f7cd9241b0a7ae09 (patch) | |
| tree | afa3ba4caebb728c43b96e176b8a569b3ad5f469 /test/enums.tm | |
| parent | 671f81137ee2e5de632526109e02c4b79197e432 (diff) | |
For tables, deprecate support for square bracket indexing and .default
values, replacing them with a `:bump()` function for tables with numeric
values. This means that counters can be implemented easily without the
need to mask complexity.
Diffstat (limited to 'test/enums.tm')
| -rw-r--r-- | test/enums.tm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/enums.tm b/test/enums.tm index 553fcf84..65ef6398 100644 --- a/test/enums.tm +++ b/test/enums.tm @@ -36,11 +36,11 @@ func main(): = yes >> x := Foo.One(123) - >> t := {x:"found"; default="missing"} - >> t[x] - = "found" - >> t[Foo.Zero] - = "missing" + >> t := {x} + >> t:has(x) + = yes + >> t:has(Foo.Zero) + = no >> choose_text(Foo.Zero) = "Zero" |
