mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-28 01:21:40 +00:00
@@ -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()
|
||||
Reference in New Issue
Block a user