tenum_array_repr.nim 278 B

123456789101112131415161718192021222324
  1. discard """
  2. output: '''
  3. 1
  4. [a, b]
  5. 2
  6. [c, d]
  7. 4
  8. [e, f]'''
  9. """
  10. # issue 5045
  11. type size1 = enum a, b
  12. echo sizeof(size1)
  13. echo repr([a, b])
  14. type size2 = enum c=0, d=20000
  15. echo sizeof(size2)
  16. echo repr([c, d])
  17. type size4 = enum e=0, f=2000000000
  18. echo sizeof(size4)
  19. echo repr([e, f])