From c0ada05e367a87aeb565b795b919731d5db100c2 Mon Sep 17 00:00:00 2001 From: metagn Date: Sun, 29 Sep 2024 00:00:33 +0300 Subject: [PATCH] no need to copy here either --- compiler/sigmatch.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 378d2ebd9cfd..ece405a9e24f 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -152,7 +152,7 @@ proc matchGenericParam(m: var TCandidate, formal: PType, n: PNode) = if n.kind in nkSymChoices: n.flags.excl nfSem let evaluated = m.c.semTryConstExpr(m.c, n, formalBase.skipTypes({tyStatic})) if evaluated != nil: - arg = makeStaticType(m.c, evaluated.typ, evaluated.copyTree) + arg = makeStaticType(m.c, evaluated.typ, evaluated) elif formalBase.kind == tyTypeDesc: if arg.kind != tyTypeDesc: arg = makeTypeDesc(m.c, arg)