nil strings are movable

This commit is contained in:
LemonBoy 2018-08-23 12:32:40 +02:00
commit 7a087ffb29
2 changed files with 20 additions and 3 deletions

View file

@ -0,0 +1,13 @@
discard """
cmd: "nim $target --nilseqs:off $options $file"
output: "Hello"
ccodecheck: "\\i@'a = ((NimStringDesc*) NIM_NIL)'"
"""
proc main() =
var a = "Hello"
echo a
a = ""
doAssert a.len == 0
main()