From 9fea0c69faa6f34fd8bfe5351ea58cbab659b781 Mon Sep 17 00:00:00 2001 From: araq Date: Thu, 13 Nov 2025 14:09:26 +0100 Subject: [PATCH] bugfixes --- compiler/ast.nim | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/compiler/ast.nim b/compiler/ast.nim index 6f04d73505..50bcad7564 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -724,7 +724,7 @@ proc appendToModule*(m: PSym, n: PNode) = m.astImpl = newNode(nkStmtList) else: assert m.astImpl.kind == nkStmtList - m.astImpl.add(n) + m.astImpl.add(n) const # for all kind of hash tables: GrowthFactor* = 2 # must be power of 2, > 0 @@ -798,13 +798,9 @@ proc base*(t: PType): PType {.inline.} = proc returnType*(n: PType): PType {.inline.} = n.sonsImpl[0] proc setReturnType*(n, r: PType) {.inline.} = - var s = n.sonsImpl - s[0] = r - n.sonsImpl = s + n.sonsImpl[0] = r proc setIndexType*(n, idx: PType) {.inline.} = - var s = n.sonsImpl - s[0] = idx - n.sonsImpl = s + n.sonsImpl[0] = idx proc firstParamType*(n: PType): PType {.inline.} = n.sonsImpl[1] proc firstGenericParam*(n: PType): PType {.inline.} = n.sonsImpl[1]