diff options
Diffstat (limited to 'tests/arc')
-rw-r--r-- | tests/arc/tcstring.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/arc/tcstring.nim b/tests/arc/tcstring.nim new file mode 100644 index 000000000..79c8a7fcf --- /dev/null +++ b/tests/arc/tcstring.nim @@ -0,0 +1,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' + |