mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-06 23:53:09 +00:00
Add redefine pragma to inner template (#220)
This commit is contained in:
parent
ad8721e0f3
commit
f40a8ba5c8
@ -120,7 +120,10 @@ template unpackPositional(params: RequestParamsRx,
|
||||
paramType: type) =
|
||||
## Convert a positional parameter from Json into Nim
|
||||
|
||||
template innerNode() =
|
||||
when not defined(nimHasTemplateRedefinitionPragma):
|
||||
{.pragma: redefine.}
|
||||
|
||||
template innerNode() {.redefine.} =
|
||||
paramVar = unpackArg(params.val(pos), paramName, paramType)
|
||||
|
||||
# e.g. (A: int, B: Option[int], C: string, D: Option[int], E: Option[string])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user