simple program works with --newruntime

This commit is contained in:
Araq 2019-04-02 10:42:58 +02:00
commit 0b96b135f8
3 changed files with 14 additions and 12 deletions

View file

@ -328,6 +328,7 @@ proc resetLoc(p: BProc, loc: var TLoc) =
let typ = skipTypes(loc.t, abstractVarRange)
if isImportedCppType(typ): return
if p.config.selectedGc == gcDestructors and typ.kind in {tyString, tySequence}:
assert rdLoc(loc) != nil
linefmt(p, cpsStmts, "$1.len = 0; $1.p = NIM_NIL;$n", rdLoc(loc))
elif not isComplexValueType(typ):
if containsGcRef: