types API: now works for proc():void
This commit is contained in:
parent
752052e903
commit
7324ed7f1f
1 changed files with 5 additions and 1 deletions
|
|
@ -51,6 +51,10 @@ proc mapTypeToBracket(name: string; t: PType; info: TLineInfo): PNode =
|
||||||
result = newNodeIT(nkBracketExpr, info, t)
|
result = newNodeIT(nkBracketExpr, info, t)
|
||||||
result.add atomicTypeX(name, t, info)
|
result.add atomicTypeX(name, t, info)
|
||||||
for i in 0 .. < t.len:
|
for i in 0 .. < t.len:
|
||||||
|
if t.sons[i] == nil:
|
||||||
|
let void = atomicTypeX("void", t, info)
|
||||||
|
void.typ = newType(tyEmpty, t.owner)
|
||||||
|
else:
|
||||||
result.add mapTypeToAst(t.sons[i], info)
|
result.add mapTypeToAst(t.sons[i], info)
|
||||||
|
|
||||||
proc mapTypeToAst(t: PType, info: TLineInfo; allowRecursion=false): PNode =
|
proc mapTypeToAst(t: PType, info: TLineInfo; allowRecursion=false): PNode =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue