From 94e94c9458d7c19e746a841f7d0b3b0d25f8468a Mon Sep 17 00:00:00 2001 From: araq Date: Fri, 14 Nov 2025 16:20:43 +0100 Subject: [PATCH] fixes regression --- compiler/cgen.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 5a0c793fe2..7d0733d90f 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -506,7 +506,7 @@ include ccgreset proc resetLoc(p: BProc, loc: var TLoc) = let containsGcRef = optSeqDestructors notin p.config.globalOptions and containsGarbageCollectedRef(loc.t) let typ = skipTypes(loc.t, abstractVarRange) - if isImportedCppType(typ): + if isImportedCppType(typ): var didGenTemp = false let rl = rdLoc(loc) let init = genCppInitializer(p.module, p, typ, didGenTemp) @@ -1445,7 +1445,8 @@ proc genProcPrototype(m: BModule, sym: PSym) = getModuleDllPath(m, sym), '"' & name & '"') elif not containsOrIncl(m.declaredProtos, sym.id): - m.queue.add(sym) + if delayedCodegen(m): + m.queue.add(sym) let asPtr = isReloadable(m, sym) var header = newBuilder("") var visibility: DeclVisibility = None