From 9f5c193c1d17d767cd0c3fb938b312e2c23a9ebd Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 19 May 2026 23:28:13 +0200 Subject: [PATCH] fixes #25814 (#25816) --- compiler/ccgstmts.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 5ea23d1f80..83f5e90172 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -341,9 +341,9 @@ proc genCppParamsForCtor(p: BProc; call: PNode; didGenTemp: var bool): Snippet = call[i][0] else: call[i] - if param.kind != nkBracketExpr or param.typ.kind in + if not param.typ.isCompileTimeOnly and (param.kind != nkBracketExpr or param.typ.kind in {tyRef, tyPtr, tyUncheckedArray, tyArray, tyOpenArray, - tyVarargs, tySequence, tyString, tyCstring, tyTuple}: + tyVarargs, tySequence, tyString, tyCstring, tyTuple}): let tempLoc = initLocExprSingleUse(p, param) didGenTemp = didGenTemp or tempLoc.k == locTemp genOtherArg(p, call, i, typ, res, argBuilder)