summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2017-01-24 07:19:28 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-01-24 06:19:28 +0100
commit0ead17bf0ecb12e32f64c050f8d28f6c22a59adb (patch)
treeb64b5f4ccb2509a8ba4ccbb2bc7934af556ac66c /compiler
parent35d48765fb5f5b2f58bf6def54fd744492212097 (diff)
downloadNim-0ead17bf0ecb12e32f64c050f8d28f6c22a59adb.tar.gz
Fixes #5271 (#5273)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jsgen.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index b60c8f3ca..fd21d17ef 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -1386,7 +1386,8 @@ proc createObjInitList(p: PProc, typ: PType, excludedFieldIDs: IntSet, output: v
     if output.len > 0: output.add(", ")
     addf(output, "m_type: $1" | "'m_type' => $#", [genTypeInfo(p, t)])
   while t != nil:
-    createRecordVarAux(p, t.skipTypes(skipPtrs).n, excludedFieldIDs, output)
+    t = t.skipTypes(skipPtrs)
+    createRecordVarAux(p, t.n, excludedFieldIDs, output)
     t = t.sons[0]
 
 proc arrayTypeForElemType(typ: PType): string =