diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-05-22 07:37:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 07:37:25 +0200 |
commit | 23dbc9ad58bd2dbfa2e877196d3f1019e0df5048 (patch) | |
tree | b1496272923f91bf66ae5618535cc2e58edb7d3d /compiler/vmgen.nim | |
parent | bab5e30972743d9dc343c9c4d3ad06f3645e5741 (diff) | |
download | Nim-23dbc9ad58bd2dbfa2e877196d3f1019e0df5048.tar.gz |
fixes #11268 (#11299)
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r-- | compiler/vmgen.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index 890f28065..6fe51dba6 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -1782,8 +1782,9 @@ proc getNullValue(typ: PType, info: TLineInfo; conf: ConfigRef): PNode = # initialize inherited fields: var base = t.sons[0] while base != nil: - getNullValueAux(skipTypes(base, skipPtrs).n, result, conf) - base = base.sons[0] + let b = skipTypes(base, skipPtrs) + getNullValueAux(b.n, result, conf) + base = b.sons[0] getNullValueAux(t.n, result, conf) of tyArray: result = newNodeIT(nkBracket, info, t) |