overloadable enums no longer experimental (#20298)

depends on #20126
This commit is contained in:
metagn 2022-09-06 00:38:38 +03:00 • committed by GitHub
commit 5ebd1248df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 41 deletions

View file

@ -2,3 +2,5 @@
type
OtherEnum* = enum
Success, Failed, More
proc some*(x: OtherEnum): bool = x == Success

View file

@ -0,0 +1,10 @@
import mcrossmodule
type
MyEnum = enum
Success
template t =
doAssert some(Success)
t()

View file

@ -1,13 +0,0 @@
discard """
action: "compile"
"""
import options, mregression
type
MyEnum = enum
Success
template t =
echo some(Success)
t()