This commit is contained in:
Araq
2014-12-30 03:05:29 +01:00
parent f30a1617ca
commit 7f415b5b11
2 changed files with 6 additions and 2 deletions

View File

@@ -1517,8 +1517,8 @@ proc getStr*(a: PNode): string =
proc getStrOrChar*(a: PNode): string =
case a.kind
of nkStrLit..nkTripleStrLit: result = a.strVal
of nkCharLit: result = $chr(int(a.intVal))
else:
of nkCharLit..nkUInt64Lit: result = $chr(int(a.intVal))
else:
internalError(a.info, "getStrOrChar")
result = ""

View File

@@ -62,3 +62,7 @@ when false:
block:
var a, b: Bar[int, 0..2]
discard foo(a, b)
# bug #1788
echo "hello" & char(ord(' ')) & "world"