summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xcompiler/semtypes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 20e31b969..3d572f517 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)