diff options
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 89cc53e1f..91ee2aae8 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -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) |