tregionptrs.nim 250 B

1234567891011121314151617
  1. discard """
  2. errormsg: "type mismatch: got <BPtr> but expected 'APtr = ptr[RegionA, int]'"
  3. line: 16
  4. """
  5. type
  6. RegionA = object
  7. APtr = RegionA ptr int
  8. RegionB = object
  9. BPtr = RegionB ptr int
  10. var x,xx: APtr
  11. var y: BPtr
  12. x = nil
  13. x = xx
  14. x = y