diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-03-07 12:55:30 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-07 12:55:30 +0100 |
commit | 0a93cf6fb9c0eabaae20a5dc092321cb828edd62 (patch) | |
tree | e88a2d10d54a4a6d2260bcfef553964f768e49bb | |
parent | 5b1a2eecd533b607240b1d74544e950f22afcffb (diff) | |
download | Nim-0a93cf6fb9c0eabaae20a5dc092321cb828edd62.tar.gz |
fixes the regression
-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) |