Merge pull request #9924 from cooldome/destructor_hotfix
destructor hot fix
This commit is contained in:
commit
6924b33141
1 changed files with 1 additions and 1 deletions
|
|
@ -647,7 +647,7 @@ proc injectDestructorCalls*(g: ModuleGraph; owner: PSym; n: PNode): PNode =
|
|||
let params = owner.typ.n
|
||||
for i in 1 ..< params.len:
|
||||
let param = params[i].sym
|
||||
if param.typ.kind == tySink:
|
||||
if param.typ.kind == tySink and hasDestructor(param.typ):
|
||||
c.destroys.add genDestroy(c, param.typ.skipTypes({tyGenericInst, tyAlias, tySink}), params[i])
|
||||
|
||||
let body = p(n, c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue