summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-19 13:00:10 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-19 13:29:11 +0200
commitfa0f04968fb37e7c717b4f6b73708cec6b380381 (patch)
treef280da40ef4ff1ba6228e62d97b81c1ebe1b9986
parent0a3efccb55602aed39643e908b293ac0b617e3fe (diff)
downloadNim-fa0f04968fb37e7c717b4f6b73708cec6b380381.tar.gz
bugfix: propagate the tfHasAsgn flag properly
-rw-r--r--compiler/ast.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index cdc78be74..b0aca2d74 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -1420,7 +1420,7 @@ proc propagateToOwner*(owner, elem: PType) =
     owner.flags.incl tfHasMeta
 
   if tfHasAsgn in elem.flags:
-    let o2 = elem.skipTypes({tyGenericInst, tyAlias})
+    let o2 = owner.skipTypes({tyGenericInst, tyAlias})
     if o2.kind in {tyTuple, tyObject, tyArray,
                    tySequence, tyOpt, tySet, tyDistinct}:
       o2.flags.incl tfHasAsgn