Fix for using typedParams with nnkMacroDef procs

This commit is contained in:
Zahary Karadjov 2019-05-22 09:50:49 +03:00
parent b909465eb8
commit 1a9ee7397d
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 3 additions and 2 deletions

View File

@ -227,8 +227,9 @@ proc newLitFixed*(arg: tuple): NimNode {.compileTime.} =
result.add nnkExprColonExpr.newTree(newIdentNode(a), newLitFixed(b))
iterator typedParams*(n: NimNode, skip = 0): (NimNode, NimNode) =
for i in (1 + skip) ..< n.params.len:
let paramNodes = n.params[i]
let params = n[3]
for i in (1 + skip) ..< params.len:
let paramNodes = params[i]
let paramType = paramNodes[^2]
for j in 0 ..< paramNodes.len - 2: