From 106cde1ff8f63f092f6a4fe3434161806075211a 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 7b1abec6a81e4..2466277821725 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -660,14 +660,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..