From 6e0e3b75cf419f9f2e61aeccaa59f91160e29628 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Wed, 10 May 2017 10:29:30 +0300 Subject: [PATCH] Fixed const sets in JS (#5790) --- compiler/jsgen.nim | 1 - compiler/jstypes.nim | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index eb3fb9f479..ee35356c92 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -2272,7 +2272,6 @@ proc myProcess(b: PPassContext, n: PNode): PNode = genModule(p, n) add(p.g.code, p.locals) add(p.g.code, p.body) - globals.unique = p.unique proc wholeCode(graph: ModuleGraph; m: BModule): Rope = for prc in globals.forwarded: diff --git a/compiler/jstypes.nim b/compiler/jstypes.nim index f49bd76683..ae30861e7b 100644 --- a/compiler/jstypes.nim +++ b/compiler/jstypes.nim @@ -59,7 +59,7 @@ proc genObjectFields(p: PProc, typ: PType, n: PNode): Rope = u = rope(lengthOrd(field.typ)) else: internalError(n.info, "genObjectFields(nkRecCase)") if result != nil: add(result, ", " & tnl) - addf(result, "[SetConstr($1), $2]", + addf(result, "[setConstr($1), $2]", [u, genObjectFields(p, typ, lastSon(b))]) result = ("{kind: 3, offset: \"$1\", len: $3, " & "typ: $2, name: $4, sons: [$5]}") % [