bugfix: propagate the tfHasAsgn flag properly

This commit is contained in:
Andreas Rumpf
2017-10-19 13:00:10 +02:00
parent 0a3efccb55
commit fa0f04968f

View File

@@ -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