fix NimNode comment repr() regression [backport: 1.2] (#19726)

This commit is contained in:
flywind 2022-04-25 17:19:21 +08:00 • committed by GitHub
commit 15ae9323e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View file

@ -60,3 +60,22 @@ macro foo(t: static Tuple): untyped =
doAssert t.b == 12345
foo((a: "foo", b: 12345))
# bug #16307
macro bug(x: untyped): string =
newLit repr(x)
let res = bug:
block:
## one
## two
## three
doAssert res == """
block:
## one
## two
## three"""