made closure iterators tests green, updated docs

This commit is contained in:
Andreas Rumpf 2015-12-31 00:16:38 +01:00
commit 307a6095fa
10 changed files with 42 additions and 35 deletions

View file

@ -1235,7 +1235,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
if isAnon: result.typ = s.typ
if isTopLevel(c) and s.kind != skIterator and
s.typ.callConv == ccClosure:
message(s.info, warnDeprecated, "top level '.closure' calling convention")
localError(s.info, "'.closure' calling convention for top level routines is invalid")
proc determineType(c: PContext, s: PSym) =
if s.typ != nil: return