t21863.nim 509 B

1234567891011121314151617181920212223242526272829
  1. discard """
  2. cmd: "nim check --hints:off $file"
  3. action: reject
  4. nimout: '''
  5. t21863.nim(28, 16) Error: undeclared field: 'A'
  6. found 'A' [enumField declared in t21863.nim(24, 18)]
  7. found 'A' [enumField declared in t21863.nim(25, 18)]
  8. t21863.nim(28, 16) Error: undeclared field: '.'
  9. t21863.nim(28, 16) Error: undeclared field: '.'
  10. t21863.nim(28, 16) Error: expression '' has no type (or is ambiguous)
  11. '''
  12. """
  13. block:
  14. type
  15. EnumA = enum A, B
  16. EnumB = enum A
  17. EnumC = enum C
  18. discard EnumC.A