toplevel .closure procs are deprecated

This commit is contained in:
Araq 2015-08-12 10:11:58 +02:00
commit 2299318d1e
3 changed files with 7 additions and 1 deletions

View file

@ -1220,6 +1220,9 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
if n.sons[patternPos].kind != nkEmpty:
c.patterns.add(s)
if isAnon: result.typ = s.typ
if isTopLevel(c) and s.kind != skClosureIterator and
s.typ.callConv == ccClosure:
message(s.info, warnDeprecated, "top level '.closure' calling convention")
proc determineType(c: PContext, s: PSym) =
if s.typ != nil: return