summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-11-25 15:29:41 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-11-26 16:04:28 +0100
commit72237e2bcfc371d917e4e14b22a3c447289ea39f (patch)
tree25922b2b6dc02898657ec9d6399b6c7938e8eb92 /compiler
parent879801c63980287070f64d94e4c4f7aeb28cb2f4 (diff)
downloadNim-72237e2bcfc371d917e4e14b22a3c447289ea39f.tar.gz
ARC: ported the GC tests over to --gc:arc
Diffstat (limited to 'compiler')
-rw-r--r--compiler/lowerings.nim1
-rw-r--r--compiler/sempass2.nim1
-rw-r--r--compiler/semtypes.nim4
3 files changed, 6 insertions, 0 deletions
diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim
index 0922ab088..96afc4828 100644
--- a/compiler/lowerings.nim
+++ b/compiler/lowerings.nim
@@ -60,6 +60,7 @@ proc lowerTupleUnpacking*(g: ModuleGraph; n: PNode; owner: PSym): PNode =
   var temp = newSym(skTemp, getIdent(g.cache, genPrefix), owner, value.info, g.config.options)
   temp.typ = skipTypes(value.typ, abstractInst)
   incl(temp.flags, sfFromGeneric)
+  incl(temp.flags, sfCursor)
 
   var v = newNodeI(nkVarSection, value.info)
   let tempAsNode = newSymNode(temp)
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index 411617acd..36179511c 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -759,6 +759,7 @@ proc track(tracked: PEffects, n: PNode) =
       # check required for 'nim check':
       if n[1].typ.len > 0:
         createTypeBoundOps(tracked, n[1].typ.lastSon, n.info)
+        createTypeBoundOps(tracked, n[1].typ, n.info)
     for i in 0 ..< safeLen(n):
       track(tracked, n.sons[i])
   of nkDotExpr:
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 23bcb3cd1..81efb9517 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -886,6 +886,10 @@ proc semAnyRef(c: PContext; n: PNode; kind: TTypeKind; prev: PType): PType =
       t.flags.incl tfHasOwned
       t.rawAddSonNoPropagationOfTypeFlags result
       result = t
+    #if result.kind == tyRef and c.config.selectedGC == gcDestructors:
+    #  result.flags.incl tfHasAsgn
+    # XXX Something like this is a good idea but it should be done
+    # in sempass2!
 
 proc findEnforcedStaticType(t: PType): PType =
   # This handles types such as `static[T] and Foo`,