tmisc_issues.nim 248 B

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