diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 20e31b9696..3d572f5176 100755 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -788,7 +788,7 @@ proc semGenericConstraints(c: PContext, n: PNode, result: PType) = else: var x = semTypeNode(c, n, nil) if x.kind in StructuralEquivTypes and ( - sonsLen(x) == 0 or x.sons[0].kind == tyEmpty): + sonsLen(x) == 0 or x.sons[0].kind in {tyGenericParam, tyEmpty}): x = newConstraint(c, x.kind) result.addSon(x)