parent
8dcf367e52
commit
5ebd1248df
12 changed files with 27 additions and 41 deletions
|
|
@ -2,3 +2,5 @@
|
|||
type
|
||||
OtherEnum* = enum
|
||||
Success, Failed, More
|
||||
|
||||
proc some*(x: OtherEnum): bool = x == Success
|
||||
10
tests/enum/tcrossmodule.nim
Normal file
10
tests/enum/tcrossmodule.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import mcrossmodule
|
||||
|
||||
type
|
||||
MyEnum = enum
|
||||
Success
|
||||
|
||||
template t =
|
||||
doAssert some(Success)
|
||||
|
||||
t()
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
discard """
|
||||
action: "compile"
|
||||
"""
|
||||
import options, mregression
|
||||
|
||||
type
|
||||
MyEnum = enum
|
||||
Success
|
||||
|
||||
template t =
|
||||
echo some(Success)
|
||||
|
||||
t()
|
||||
Loading…
Add table
Add a link
Reference in a new issue