tensuremove1.nim 271 B

12345678910111213141516
  1. discard """
  2. errormsg: "cannot move 's', which introduces an implicit copy"
  3. matrix: "--cursorinference:on; --cursorinference:off"
  4. """
  5. type
  6. String = object
  7. id: string
  8. proc hello =
  9. var s = String(id: "1")
  10. var m = ensureMove s
  11. discard m
  12. discard s
  13. hello()