From 6905f759e5cdbbfa7e16cf183d01ca1f8a858f71 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 17 Mar 2024 22:06:55 -0400 Subject: Empty enums use a singleton instead of a constructor --- test/enums.tm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/enums.tm') diff --git a/test/enums.tm b/test/enums.tm index 6dde3601..1b02686d 100644 --- a/test/enums.tm +++ b/test/enums.tm @@ -1,6 +1,6 @@ enum Foo(Zero, One(x:Int), Two(x,y:Int)) ->> Foo.Zero() +>> Foo.Zero = Foo.Zero() >> Foo.One(123) = Foo.One(x=123) @@ -10,7 +10,7 @@ enum Foo(Zero, One(x:Int), Two(x,y:Int)) >> Foo.One(10) == Foo.One(10) = yes ->> Foo.One(10) == Foo.Zero() +>> Foo.One(10) == Foo.Zero = no >> Foo.One(10) == Foo.One(-1) @@ -23,7 +23,7 @@ enum Foo(Zero, One(x:Int), Two(x,y:Int)) >> t := {x=>"found"; default="missing"} >> t[x] = "found" ->> t[Foo.Zero()] +>> t[Foo.Zero] = "missing" when x is o:One -- cgit v1.2.3