implemented {.noforward:on.} for type sections; useful for c2nim generated wrappers; to be documented

This commit is contained in:
Araq 2015-07-08 11:12:39 +02:00
commit 0a624bec1e
3 changed files with 75 additions and 12 deletions

View file

@ -421,7 +421,11 @@ proc myOpenCached(module: PSym, rd: PRodReader): PPassContext =
for m in items(rd.methods): methodDef(m, true)
proc semStmtAndGenerateGenerics(c: PContext, n: PNode): PNode =
result = semStmt(c, n)
if sfNoForward in c.module.flags:
result = semAllTypeSections(c, n)
else:
result = n
result = semStmt(c, result)
# BUGFIX: process newly generated generics here, not at the end!
if c.lastGenericIdx < c.generics.len:
var a = newNodeI(nkStmtList, n.info)