summary refs log tree commit diff stats
path: root/tests/proc/t19795.nim
blob: 677ec0a6308ebf23f69935f4c4f497e5085607e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
discard """
  matrix: "--mm:arc"
"""

# bug #19795
# bug #21085

type Vector = seq[int]

var vect: Vector = newSeq[int](5)
doAssert vect == @[0, 0, 0, 0, 0]

# Needed to get the problem. Could also use "var".
let vectCopy = vect

# Then some procedure definition is needed to get the problem.
proc p(): int = 3

doAssert vect == @[0, 0, 0, 0, 0]