From 4d3548e3c2282668044eaa140d2e94a4a3d71bec Mon Sep 17 00:00:00 2001 From: metagn Date: Fri, 1 Sep 2023 16:37:16 +0300 Subject: [PATCH] unify explicit generic param semchecking in calls (#22618) fixes #9040 (cherry picked from commit 6738f44af3866e4cace94d34b653acf3283f0cde) --- compiler/semcall.nim | 8 ++++++-- compiler/semexprs.nim | 4 ---- tests/generics/timplicit_and_explicit.nim | 21 ++++++++++++++++++++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/compiler/semcall.nim b/compiler/semcall.nim index d2460ab06df7d..e2844e4302c42 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -665,14 +665,18 @@ proc explicitGenericSym(c: PContext, n: PNode, s: PSym): PNode = onUse(info, s) result = newSymNode(newInst, info) -proc explicitGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode = - assert n.kind == nkBracketExpr +proc setGenericParams(c: PContext, n: PNode) = + ## sems generic params in subscript expression for i in 1..