destructors: lift type bound ops to objects and arrays etc

This commit is contained in:
Andreas Rumpf 2017-10-17 14:48:16 +02:00
commit 58d5f96790
4 changed files with 71 additions and 32 deletions

View file

@ -553,7 +553,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
# this can only happen for errornous var statements:
if typ == nil: continue
typeAllowedCheck(a.info, typ, symkind)
liftTypeBoundOps(c, typ)
liftTypeBoundOps(c, typ, a.info)
var tup = skipTypes(typ, {tyGenericInst, tyAlias})
if a.kind == nkVarTuple:
if tup.kind != tyTuple: