This commit is contained in:
Araq
2018-05-02 09:15:32 +02:00
parent 48aee47bf6
commit eb03d9aafe

View File

@@ -278,7 +278,7 @@ template callFormatOption(res, arg, option) {.dirty.} =
macro `&`*(pattern: string): untyped =
## For a specification of the ``&`` macro, see the module level documentation.
if pattern.kind notin {nnkStrLit..nnkTripleStrLit}:
error "& only works with string literals", pattern
error "string formatting (fmt(), &) only works with string literals", pattern
let f = pattern.strVal
var i = 0
let res = genSym(nskVar, "fmtRes")