'assert' is now implemented without compiler magic

This commit is contained in:
Araq 2011-12-04 20:14:50 +01:00
commit 70cf34cbdc
16 changed files with 66 additions and 24 deletions

View file

@ -404,7 +404,7 @@ proc semFor(c: PContext, n: PNode): PNode =
openScope(c.tab)
n.sons[length-2] = semExprNoDeref(c, n.sons[length-2], {efWantIterator})
var call = n.sons[length-2]
if call.kind != nkCall or call.sons[0].kind != nkSym or
if call.kind notin nkCallKinds or call.sons[0].kind != nkSym or
call.sons[0].sym.kind != skIterator:
GlobalError(n.sons[length - 2].info, errIteratorExpected)
elif call.sons[0].sym.magic != mNone: