summary refs log blame commit diff stats
path: root/tests/seq/tshallowseq.nim
blob: 9a8bdb954fd92a0b788605c53a4f795e1c6bef58 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                              
discard """
  output: '''@[1, 42, 3]
@[1, 42, 3]
'''
"""
proc xxx() =
  var x: seq[int] = @[1, 2, 3]
  var y: seq[int]

  system.shallowCopy(y, x)

  y[1] = 42

  echo y
  echo x

xxx()