summary refs log tree commit diff stats
path: root/tests/ccgbugs/tassign_nil_strings.nim
blob: 07d2c2aeb90f61a55ca1d305c432ecbb6ac0af04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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()