From 6738f44af3866e4cace94d34b653acf3283f0cde 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 --- 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 adfc98e197..a4114497fb 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -733,14 +733,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..