Skip to content

Commit 095f1de

Browse files
committed
test generic fix
1 parent 1e3caf4 commit 095f1de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/semtypes.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,8 @@ proc semTypeIdent(c: PContext, n: PNode): PSym =
20492049
# proc signature for example
20502050
if c.inGenericInst > 0:
20512051
let bound = result.typ.elementType.sym
2052-
if bound != nil: return bound
2052+
if bound != nil and bound.typ == result.typ.elementType:
2053+
return bound
20532054
return result
20542055
if result.typ.sym == nil:
20552056
localError(c.config, n.info, errTypeExpected)

0 commit comments

Comments
 (0)