diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index d85008342..4d912a46f 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -2055,72 +2055,80 @@ proc semGenericConstraints(c: PContext, x: PType): PType = result = newTypeWithSons(c, tyGenericParam, @[x]) proc semGenericParamList(c: PContext, n: PNode, father: PType = nil): PNode = + + template addSym(result: PNode, s: PSym): untyped = + if father != nil: addSonSkipIntLit(father, s.typ) + if sfGenSym notin s.flags: addDecl(c, s) + result.add newSymNode(s) + result = copyNode(n) if n.kind != nkGenericParams: illFormedAst(n, c.config) return for i in 0..