introduce --newruntime switch for the upcoming destructors and move semantics

This commit is contained in:
Andreas Rumpf 2017-10-13 06:38:59 +02:00
commit 63530be0b8
6 changed files with 19 additions and 11 deletions

View file

@ -1383,7 +1383,7 @@ proc semAsgn(c: PContext, n: PNode; mode=asgnNormal): PNode =
typeMismatch(n.info, lhs.typ, rhs.typ)
n.sons[1] = fitNode(c, le, rhs, n.info)
when not newDestructors:
if not newDestructors:
if tfHasAsgn in lhs.typ.flags and not lhsIsResult and
mode != noOverloadedAsgn:
return overloadedAsgn(c, lhs, n.sons[1])