idetools improvements; preparation of first class iterators; fixes #183

This commit is contained in:
Araq 2012-08-02 23:14:38 +02:00
commit 7d6500f1de
12 changed files with 95 additions and 36 deletions

View file

@ -870,9 +870,13 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
of nkType: result = n.typ
of nkStmtListType: result = semStmtListType(c, n, prev)
of nkBlockType: result = semBlockType(c, n, prev)
else:
else:
LocalError(n.info, errTypeExpected)
result = errorType(c)
if prev != nil and prev.kind == tyForward:
prev.kind = tyProxy
result = prev
else:
result = errorType(c)
proc setMagicType(m: PSym, kind: TTypeKind, size: int) =
m.typ.kind = kind