torc.nim 312 B

1234567891011121314151617181920212223242526
  1. discard """
  2. targets: "cpp"
  3. matrix: "--gc:orc"
  4. """
  5. import std/options
  6. # bug #18410
  7. type
  8. O = object of RootObj
  9. val: pointer
  10. proc p(): Option[O] = none(O)
  11. doAssert $p() == "none(O)"
  12. # bug #17351
  13. type
  14. Foo = object of RootObj
  15. Foo2 = object of Foo
  16. Bar = object
  17. x: Foo2
  18. var b = Bar()
  19. discard b