diff options
author | Araq <rumpf_a@web.de> | 2015-08-12 10:11:58 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-08-14 02:19:32 +0200 |
commit | 2299318d1e303ffdf5a9a79663e2c3b126bb5352 (patch) | |
tree | 179b202469e09d7a0a8473eaff6bc7d3d196f356 /compiler/semstmts.nim | |
parent | 2f721f0d9928a4ae25b2f2b3761d8861a13e877d (diff) | |
download | Nim-2299318d1e303ffdf5a9a79663e2c3b126bb5352.tar.gz |
toplevel .closure procs are deprecated
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 3d9363d77..ffda6a1bb 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -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 |