fix #20067, fix #18976 [backport] (#20069)

(cherry picked from commit 685bf944aa)
This commit is contained in:
metagn
2022-07-22 10:04:07 +03:00
committed by narimiran
parent 5771a0f9c4
commit 7d0bfc6725
2 changed files with 31 additions and 1 deletions

View File

@@ -1352,7 +1352,9 @@ proc `$`*(node: NimNode): string =
of nnkOpenSymChoice, nnkClosedSymChoice:
result = $node[0]
of nnkAccQuoted:
result = $node[0]
result = ""
for i in 0 ..< node.len:
result.add(repr(node[i]))
else:
badNodeKind node, "$"