diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-18 20:58:36 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-18 20:58:36 -0400 |
| commit | 6f3b2c073a968e57d787849dce42ff1253ed0102 (patch) | |
| tree | e5fb20ae4322fdbbded412c2cb771b7e4ed68ecf /test/enums.tm | |
| parent | 967b649da20f1cb2011025456853cb55f25e9a88 (diff) | |
Add `enum.tag` as a way to do a boolean test for whether a value has a
particular tag or not
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 b734d487..f4af342d 100644 --- a/test/enums.tm +++ b/test/enums.tm @@ -23,6 +23,12 @@ func main(): >> Foo.Two(123, 456) = Foo.Two(x=123, y=456) + >> one := Foo.One(123) + >> one.One + = yes + >> one.Two + = no + >> Foo.One(10) == Foo.One(10) = yes |
