implemented 'import except'

This commit is contained in:
Araq 2012-11-28 23:54:23 +01:00
commit 92e10e4b18
14 changed files with 120 additions and 95 deletions

View file

@ -825,6 +825,7 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
checkSonsLen(n, 3)
result = semTypeNode(c, n.sons[1], prev)
if result.kind in NilableTypes and n.sons[2].kind == nkNilLit:
# XXX this is wrong for tyString at least
result.flags.incl(tfNotNil)
else:
LocalError(n.info, errGenerated, "invalid type")