aboutsummaryrefslogtreecommitdiff
path: root/test/enums.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-31 23:33:22 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-31 23:33:22 -0400
commit5fc7577b5a3bc2c445522dfd5b287e1c6eddc3e9 (patch)
tree34d44c9330dc3ec71fc850b95b3412a1ce292cb8 /test/enums.tm
parenta571ccffd795a595e990a3405dcf977aafc33c6c (diff)
Switch to using optional return values for list indexing.
Diffstat (limited to 'test/enums.tm')
-rw-r--r--test/enums.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/enums.tm b/test/enums.tm
index 080e5d97..03eb6028 100644
--- a/test/enums.tm
+++ b/test/enums.tm
@@ -61,7 +61,7 @@ func main()
i := 1
cases := [Foo.One(1), Foo.One(2), Foo.Zero]
- while when cases[i] is One(x)
+ while when cases[i]! is One(x)
>> x
i += 1
@@ -77,7 +77,7 @@ func main()
]
= ["Zero", "Small 1", "Small 2", "Other"]
- >> expr := when cases[1] is One(y)
+ >> expr := when cases[1]! is One(y)
y + 1
else
-1