Merge pull request #8021 from yglukhov/seq-lit

Added NIM_STRLIT_FLAG to seq literals
This commit is contained in:
Andreas Rumpf
2018-06-14 17:38:12 +02:00
committed by GitHub

View File

@@ -2436,7 +2436,7 @@ proc genConstSimpleList(p: BProc, n: PNode): Rope =
addf(result, "}$n", [])
proc genConstSeq(p: BProc, n: PNode, t: PType): Rope =
var data = "{{$1, $1}" % [n.len.rope]
var data = "{{$1, $1 | NIM_STRLIT_FLAG}" % [n.len.rope]
if n.len > 0:
# array part needs extra curlies:
data.add(", {")