fix state array constant types (#25893)

else there's a mismatch in the AST for the bracket constructor

(cherry picked from commit 13d152a4d1)
This commit is contained in:
Jacek Sieka
2026-06-11 16:12:28 +02:00
committed by narimiran
parent 3f48ce8009
commit ffeafeab74

View File

@@ -252,7 +252,8 @@ proc newCurExcAccess(ctx: var Ctx): PNode =
ctx.newEnvVarAccess(ctx.curExcSym)
proc newStateLabel(ctx: Ctx): PNode =
ctx.g.newIntLit(TLineInfo(), 0)
result = nkIntLit.newIntNode(0)
result.typ = getSysType(ctx.g, TLineInfo(), tyInt16)
proc newState(ctx: var Ctx, n: PNode, inlinable: bool, label: PNode): PNode =
# Creates a new state, adds it to the context