fixes unowned->owned conversion rule

This commit is contained in:
Andreas Rumpf
2019-04-06 09:53:59 +02:00
parent f101f09256
commit bc681a328f

View File

@@ -1616,7 +1616,7 @@ proc semAsgn(c: PContext, n: PNode; mode=asgnNormal): PNode =
c.p.owner.typ.sons[0] = rhsTyp
else:
typeMismatch(c.config, n.info, lhs.typ, rhsTyp)
asgnToResult(c, n, n.sons[0], n.sons[1])
asgnToResult(c, n, n.sons[0], rhs)
n.sons[1] = fitNode(c, le, rhs, goodLineInfo(n[1]))
liftTypeBoundOps(c, lhs.typ, lhs.info)