fixes a long standing bug with varargs type inference [backport] (#23720)

(cherry picked from commit 5996b12355)
This commit is contained in:
Andreas Rumpf
2024-06-14 09:16:39 +02:00
committed by narimiran
parent d83eb88eb9
commit 8d1f03e1da

View File

@@ -2455,7 +2455,7 @@ proc arrayConstr(c: PContext, n: PNode): PType =
result = newTypeS(tyArray, c)
rawAddSon(result, makeRangeType(c, 0, 0, n.info))
addSonSkipIntLit(result, skipTypes(n.typ,
{tyGenericInst, tyVar, tyLent, tyOrdinal}), c.idgen)
{tyVar, tyLent, tyOrdinal}), c.idgen)
proc arrayConstr(c: PContext, info: TLineInfo): PType =
result = newTypeS(tyArray, c)