From 1a9ee7397dc169f8452189c2fc5e2a5c53024b22 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Wed, 22 May 2019 09:50:49 +0300 Subject: [PATCH] Fix for using typedParams with nnkMacroDef procs --- std_shims/macros_shim.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/std_shims/macros_shim.nim b/std_shims/macros_shim.nim index 9215d86..fe354d7 100644 --- a/std_shims/macros_shim.nim +++ b/std_shims/macros_shim.nim @@ -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: