test generic fix

This commit is contained in:
ringabout
2026-02-19 19:25:17 +08:00
parent 1e3caf457b
commit 095f1debaa

View File

@@ -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)