t19795.nim 345 B

12345678910111213141516171819
  1. discard """
  2. matrix: "--mm:arc"
  3. """
  4. # bug #19795
  5. # bug #21085
  6. type Vector = seq[int]
  7. var vect: Vector = newSeq[int](5)
  8. doAssert vect == @[0, 0, 0, 0, 0]
  9. # Needed to get the problem. Could also use "var".
  10. let vectCopy = vect
  11. # Then some procedure definition is needed to get the problem.
  12. proc p(): int = 3
  13. doAssert vect == @[0, 0, 0, 0, 0]