Files
Nim/tests/seq/tshallowseq.nim
Jacek Sieka 266e40f27e add test for shallow seq copy
currently looks like it's not covered
2016-03-23 22:29:28 +08:00

18 lines
186 B
Nim

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()