fixes #4238
This commit is contained in:
parent
95bb19a579
commit
5edbc20e13
1 changed files with 2 additions and 6 deletions
|
|
@ -29,21 +29,17 @@ proc createProcType(p, b: NimNode): NimNode {.compileTime.} =
|
|||
of nnkExprColonExpr:
|
||||
identDefs.add ident[0]
|
||||
identDefs.add ident[1]
|
||||
of nnkIdent:
|
||||
else:
|
||||
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:
|
||||
else:
|
||||
var identDefs = newNimNode(nnkIdentDefs)
|
||||
identDefs.add newIdentNode("i0")
|
||||
identDefs.add(p)
|
||||
identDefs.add newEmptyNode()
|
||||
formalParams.add identDefs
|
||||
else:
|
||||
error("Incorrect type list in proc type declaration.")
|
||||
|
||||
result.add formalParams
|
||||
result.add newEmptyNode()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue