owned refs must be moved
This commit is contained in:
parent
f8bf24623c
commit
5b1a2eecd5
4 changed files with 8 additions and 27 deletions
|
|
@ -227,6 +227,7 @@ 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
|
||||
t.rawAddSonNoPropagationOfTypeFlags baseType
|
||||
result = newNodeI(nkType, n.info)
|
||||
result.typ = makeTypeDesc(c, t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue