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

View file

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

View file

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