summary refs log tree commit diff stats
path: root/tests/arc/tcstring.nim
blob: 79c8a7fcf0317928632170ed2657fe1931d78921 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  cmd: "nim c --gc:arc -r $file"
  nimout: '''hello
h
o
'''
"""

# Issue #13321: [codegen] --gc:arc does not properly emit cstring, results in SIGSEGV

let a = "hello".cstring
echo a
echo a[0]
echo a[4]
doAssert a[a.len] == '\0'