Just trolling, but that's why in Go, type casts also return a boolean for you
to check, and since it's a tuple result, you have to handle it instead of
chaining your value to something else. Couldn't this be implemented in a macro
returning an `Option[X]`?
type X = enum
Z
var a = 42
var b = a.toEnum(X)
if b.isSome:
# use b
Run
- Safe `enum` conversion mildred
- Safe `enum` conversion planetis
- Safe `enum` conversion Zoom
- Safe `enum` conversion ynfle
- Safe `enum` conversion arnetheduck
- Safe `enum` conversion cumulonimbus
- Safe `enum` conversion ElegantBeef
- Safe `enum` conversion lscrd
- Safe `enum` conversion ElegantBeef
- Safe `enum` conversion arnetheduck
- Safe `enum` conversion arnetheduck
