From 095f1debaa34a8223ed140d57370067c86e8e425 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 19 Feb 2026 19:25:17 +0800 Subject: [PATCH] test generic fix --- compiler/semtypes.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index c6ed5e77dc..ede1c819e4 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -2049,7 +2049,8 @@ proc semTypeIdent(c: PContext, n: PNode): PSym = # proc signature for example if c.inGenericInst > 0: let bound = result.typ.elementType.sym - if bound != nil: return bound + if bound != nil and bound.typ == result.typ.elementType: + return bound return result if result.typ.sym == nil: localError(c.config, n.info, errTypeExpected)