diff --git a/compiler/ast.nim b/compiler/ast.nim index cdc78be743..b0aca2d748 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