fixes #1788
This commit is contained in:
parent
f30a1617ca
commit
7f415b5b11
2 changed files with 6 additions and 2 deletions
|
|
@ -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 = ""
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue