From 6f3b2c073a968e57d787849dce42ff1253ed0102 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 18 Aug 2024 20:58:36 -0400 Subject: Add `enum.tag` as a way to do a boolean test for whether a value has a particular tag or not --- test/enums.tm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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 -- cgit v1.2.3