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:
|
of nnkExprColonExpr:
|
||||||
identDefs.add ident[0]
|
identDefs.add ident[0]
|
||||||
identDefs.add ident[1]
|
identDefs.add ident[1]
|
||||||
of nnkIdent:
|
else:
|
||||||
identDefs.add newIdentNode("i" & $i)
|
identDefs.add newIdentNode("i" & $i)
|
||||||
identDefs.add(ident)
|
identDefs.add(ident)
|
||||||
else:
|
|
||||||
error("Incorrect type list in proc type declaration.")
|
|
||||||
identDefs.add newEmptyNode()
|
identDefs.add newEmptyNode()
|
||||||
formalParams.add identDefs
|
formalParams.add identDefs
|
||||||
of nnkIdent:
|
else:
|
||||||
var identDefs = newNimNode(nnkIdentDefs)
|
var identDefs = newNimNode(nnkIdentDefs)
|
||||||
identDefs.add newIdentNode("i0")
|
identDefs.add newIdentNode("i0")
|
||||||
identDefs.add(p)
|
identDefs.add(p)
|
||||||
identDefs.add newEmptyNode()
|
identDefs.add newEmptyNode()
|
||||||
formalParams.add identDefs
|
formalParams.add identDefs
|
||||||
else:
|
|
||||||
error("Incorrect type list in proc type declaration.")
|
|
||||||
|
|
||||||
result.add formalParams
|
result.add formalParams
|
||||||
result.add newEmptyNode()
|
result.add newEmptyNode()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue