tfinalobj.nim 155 B

1234567891011121314151617
  1. discard """
  2. output: "abc"
  3. """
  4. type
  5. TA = object {.pure, final.}
  6. x: string
  7. var
  8. a: TA
  9. a.x = "abc"
  10. doAssert TA.sizeof == string.sizeof
  11. echo a.x