diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-04-20 22:08:03 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-04-20 22:08:03 +0100 |
commit | dad99376a55e61f83606956a0c1cab289387d1d5 (patch) | |
tree | 76b4d112ab30638657ec37b6bb5dd03ed297e9fa /lib | |
parent | 57cc8237f72b26cb56f8f250e382f8a0e091aea1 (diff) | |
download | Nim-dad99376a55e61f83606956a0c1cab289387d1d5.tar.gz |
Param name and type combos now work in type sig. sugar.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/future.nim | 11 |
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: |