From 8d1f03e1da87b6602cf9dd7f0768c0c6286bbf40 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 14 Jun 2024 09:16:39 +0200 Subject: [PATCH] fixes a long standing bug with varargs type inference [backport] (#23720) (cherry picked from commit 5996b12355d96d47cc2b12258906a96eeb28475e) --- compiler/sigmatch.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 96dd44d766..5b0a5a339a 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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)