diff options
author | chmod222 <304922+chmod222@users.noreply.github.com> | 2023-04-01 20:29:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-01 20:29:28 +0200 |
commit | 0c6f14af048c4bd61c91552af79c003dfd34601e (patch) | |
tree | ac209c910798f8b5d0fee6061f37fa293e454fbe /lib | |
parent | a80f1a324fff0b2af47c0766750b3188bcab8041 (diff) | |
download | Nim-0c6f14af048c4bd61c91552af79c003dfd34601e.tar.gz |
macros: Extend treeTraverse intVal range to nnkUInt64Lit (#21597)
* Extend intVal range to nnkUInt64Lit Fixes #21593 * Properly cast intVal as unsigned * Add testcase for #21593
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/macros.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 9cb694bd8..28f52f0a9 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -947,6 +947,8 @@ proc treeTraverse(n: NimNode; res: var string; level = 0; isLisp = false, indent discard # same as nil node in this representation of nnkCharLit .. nnkInt64Lit: res.add(" " & $n.intVal) + of nnkUIntLit .. nnkUInt64Lit: + res.add(" " & $cast[uint64](n.intVal)) of nnkFloatLit .. nnkFloat64Lit: res.add(" " & $n.floatVal) of nnkStrLit .. nnkTripleStrLit, nnkCommentStmt, nnkIdent, nnkSym: |