From 0ead17bf0ecb12e32f64c050f8d28f6c22a59adb Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Tue, 24 Jan 2017 07:19:28 +0200 Subject: [PATCH] Fixes #5271 (#5273) --- compiler/jsgen.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index b60c8f3cad..fd21d17ef3 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 =