tcrossmodule.nim 282 B

12345678910111213141516
  1. import mcrossmodule
  2. type
  3. MyEnum = enum
  4. Success
  5. template t =
  6. doAssert some(Success)
  7. t()
  8. block: # legacy support for behavior before overloadableEnums
  9. # warning: ambiguous enum field 'Success' assumed to be of type MyEnum
  10. let x = {Success}
  11. doAssert x is set[MyEnum]