fixes the regression

This commit is contained in:
Andreas Rumpf
2019-03-07 12:55:30 +01:00
parent 5b1a2eecd5
commit 0a93cf6fb9

View File

@@ -227,7 +227,8 @@ proc semConv(c: PContext, n: PNode): PNode =
if targetType.kind in {tySink, tyLent, tyOwned}:
let baseType = semTypeNode(c, n.sons[1], nil).skipTypes({tyTypeDesc})
let t = newTypeS(targetType.kind, c)
t.flags.incl tfHasOwned
if targetType.kind == tyOwned:
t.flags.incl tfHasOwned
t.rawAddSonNoPropagationOfTypeFlags baseType
result = newNodeI(nkType, n.info)
result.typ = makeTypeDesc(c, t)