-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Not sure if it's expected to work, but here is the sample:
type
EnumContainer[T: enum] = object
val: T
MyEnum = enum
meEnumValue
converter fromEnum[T: enum](t: T): EnumContainer[T] =
result = EnumContainer(val: t)
let cont: EnumContainer[MyEnum] = meEnumValue
# Error: type mismatch: got (MyEnum) but expected 'EnumContainer[MyEnum]'