summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/future.nim11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/pure/future.nim b/lib/pure/future.nim
index 2401c4f72..349ee2dcc 100644
--- a/lib/pure/future.nim
+++ b/lib/pure/future.nim
@@ -26,8 +26,15 @@ proc createProcType(p, b: PNimrodNode): PNimrodNode {.compileTime.} =
     for i in 0 .. <p.len:
       let ident = p[i]
       var identDefs = newNimNode(nnkIdentDefs)
-      identDefs.add newIdentNode("i" & $i)
-      identDefs.add(ident)
+      case ident.kind
+      of nnkExprColonExpr:
+        identDefs.add ident[0]
+        identDefs.add ident[1]
+      of nnkIdent:
+        identDefs.add newIdentNode("i" & $i)
+        identDefs.add(ident)
+      else:
+        error("Incorrect type list in proc type declaration.")
       identDefs.add newEmptyNode()
       formalParams.add identDefs
   of nnkIdent: