Merge pull request #8746 from LemonBoy/nil-opts

nil strings are movable
This commit is contained in:
Andreas Rumpf 2018-09-23 07:51:22 +02:00 • committed by GitHub
commit 179791aa9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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()