tmisc_issues.nim 280 B

123456789101112131415161718192021
  1. discard """
  2. matrix: "--mm:refc; --mm:orc"
  3. targets: "c cpp js"
  4. """
  5. import std/assertions
  6. # bug #20227
  7. type
  8. Data = object
  9. id: int
  10. Test = distinct Data
  11. Object = object
  12. data: Test
  13. var x: Object = Object(data: Test(Data(id: 12)))
  14. doAssert Data(x.data).id == 12