summary refs log tree commit diff stats
path: root/compiler/vmgen.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-05-22 07:37:25 +0200
committerGitHub <noreply@github.com>2019-05-22 07:37:25 +0200
commit23dbc9ad58bd2dbfa2e877196d3f1019e0df5048 (patch)
treeb1496272923f91bf66ae5618535cc2e58edb7d3d /compiler/vmgen.nim
parentbab5e30972743d9dc343c9c4d3ad06f3645e5741 (diff)
downloadNim-23dbc9ad58bd2dbfa2e877196d3f1019e0df5048.tar.gz
fixes #11268 (#11299)
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r--compiler/vmgen.nim5
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)