From 93ced31353813c2f19c38a8c0af44737fa8d9f86 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sun, 6 Aug 2023 20:26:21 +0800 Subject: use strictdefs for compiler (#22365) * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup --- compiler/vmops.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/vmops.nim') diff --git a/compiler/vmops.nim b/compiler/vmops.nim index 8fb1ae901..73d24a273 100644 --- a/compiler/vmops.nim +++ b/compiler/vmops.nim @@ -172,6 +172,7 @@ proc querySettingImpl(conf: ConfigRef, switch: BiggestInt): string = proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] = template copySeq(field: untyped): untyped = + result = @[] for i in field: result.add i.string case MultipleValueSetting(switch) @@ -406,6 +407,6 @@ proc registerAdditionalOps*(c: PCtx) = registerCallback c, "stdlib.marshal.loadVM", proc(a: VmArgs) = let typ = a.getNode(0).typ let p = a.getReg(1) - var res: string + var res: string = "" storeAny(res, typ, regToNode(p[]), c.config) setResult(a, res) -- cgit 1.4.1-2-gfad0