summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-10-19 16:21:01 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-10-20 08:11:07 +0200
commit61ea85687c2950bb40c23a1a7cd2c13473bd9662 (patch)
tree85aedf0d63974a22dd63ae672a7aef2b2d28bffb /compiler/semstmts.nim
parent832b0a0232e610c1935aaf6ce0b45f69199f8a19 (diff)
downloadNim-61ea85687c2950bb40c23a1a7cd2c13473bd9662.tar.gz
refactoring: --newruntime consists of 3 different switches
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index f5a82b910..518b5e5e8 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1519,7 +1519,7 @@ proc semLambda(c: PContext, n: PNode, flags: TExprFlags): PNode =
   closeScope(c)           # close scope for parameters
   popOwner(c)
   result.typ = s.typ
-  if optNimV2 in c.config.globalOptions:
+  if optOwnedRefs in c.config.globalOptions:
     result.typ = makeVarType(c, result.typ, tyOwned)
 
 proc semInferredLambda(c: PContext, pt: TIdTable, n: PNode): PNode =
@@ -1556,7 +1556,7 @@ proc semInferredLambda(c: PContext, pt: TIdTable, n: PNode): PNode =
   popProcCon(c)
   popOwner(c)
   closeScope(c)
-  if optNimV2 in c.config.globalOptions and result.typ != nil:
+  if optOwnedRefs in c.config.globalOptions and result.typ != nil:
     result.typ = makeVarType(c, result.typ, tyOwned)
   # alternative variant (not quite working):
   # var prc = arg[0].sym
@@ -1948,7 +1948,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
   if isAnon:
     n.kind = nkLambda
     result.typ = s.typ
-    if optNimV2 in c.config.globalOptions:
+    if optOwnedRefs in c.config.globalOptions:
       result.typ = makeVarType(c, result.typ, tyOwned)
   if isTopLevel(c) and s.kind != skIterator and
       s.typ.callConv == ccClosure: