t16374.nim 526 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. discard """
  2. matrix: "--gc:refc; --gc:orc"
  3. """
  4. block:
  5. iterator mvalues(t: var seq[seq[int]]): var seq[int] =
  6. yield t[0]
  7. var t: seq[seq[int]]
  8. while false:
  9. for v in t.mvalues:
  10. discard
  11. proc ok =
  12. while false:
  13. for v in t.mvalues:
  14. discard
  15. ok()
  16. block:
  17. iterator mvalues(t: var seq[seq[int]]): lent seq[int] =
  18. yield t[0]
  19. var t: seq[seq[int]]
  20. while false:
  21. for v in t.mvalues:
  22. discard
  23. proc ok =
  24. while false:
  25. for v in t.mvalues:
  26. discard
  27. ok()