summary refs log tree commit diff stats
path: root/compiler/semtypinst.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semtypinst.nim')
-rw-r--r--compiler/semtypinst.nim11
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 54ea9769c..0157ecd0b 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -434,17 +434,6 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType =
   # handleGenericInvocation will handle the alias-to-alias-to-alias case
   if newbody.isGenericAlias: newbody = newbody.skipGenericAlias
 
-  let origSym = newbody.sym
-  if origSym != nil and sfFromGeneric notin origSym.flags:
-    # same as `replaceTypeVarsS` but directly set the type without recursion:
-    newbody.sym = copySym(origSym, cl.c.idgen)
-    incl(newbody.sym.flags, sfFromGeneric)
-    newbody.sym.owner = origSym.owner
-    newbody.sym.typ = newbody
-    # unfortunately calling `replaceTypeVarsN` causes recursion, so this AST
-    # is the original generic body AST
-    newbody.sym.ast = copyTree(origSym.ast)
-
   rawAddSon(result, newbody)
   checkPartialConstructedType(cl.c.config, cl.info, newbody)
   if not cl.allowMetaTypes: