t8781.nim 547 B

1234567891011121314151617181920212223242526
  1. discard """
  2. output: ""
  3. """
  4. type
  5. Drawable = object of RootObj
  6. discard
  7. # issue #8781, following type was broken due to 'U' suffix
  8. # on `animatedU`. U also added as union identifier for C.
  9. # replaced by "_U" prefix, which is not allowed as an
  10. # identifier
  11. TypeOne = ref object of Drawable
  12. animatedU: bool
  13. case animated: bool
  14. of true:
  15. frames: seq[int]
  16. of false:
  17. region: float
  18. when true:
  19. let r = 1.5
  20. let a = TypeOne(animatedU: true,
  21. animated: false,
  22. region: r)