summary refs log blame commit diff stats
path: root/tests/system/tnewstring_uninitialized.nim
blob: 9bc0e162298e058d4c6a303dd961f6268394a418 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                           
discard """
  matrix: "--mm:refc;"
"""

# bug #22555
var x = newStringUninit(10)
doAssert x.len == 10
for i in 0..<x.len:
  x[i] = chr(ord('a') + i)

doAssert x == "abcdefghij"