fixes #12612 [backport] (#12681)

This commit is contained in:
Andreas Rumpf
2019-11-19 12:09:36 +01:00
committed by GitHub
parent 03fa9a9041
commit 56a00da34a
2 changed files with 17 additions and 6 deletions

View File

@@ -134,6 +134,14 @@ doAssert fmt"{nat:3o}" == "100"
doAssert fmt"{nat:3x}" == " 40"
doAssert fmt"{nat:3X}" == " 40"
# bug #12612
proc my_proc =
const value = "value"
const a = &"{value}"
assert a == value
my_proc()
block:
template fmt(pattern: string; openCloseChar: char): untyped =
fmt(pattern, openCloseChar, openCloseChar)