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.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index a2626ffe4..29e75e188 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -310,6 +310,9 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType =
     # generics *when the type is constructed*:
     newbody.deepCopy = cl.c.instTypeBoundOp(cl.c, dc, result, cl.info,
                                             attachedDeepCopy, 1)
+  newbody.typeInst = result
+  if newbody.kind == tyRef:
+    newbody.lastSon.typeInst = result
   let asgn = newbody.assignment
   if asgn != nil and sfFromGeneric notin asgn.flags:
     # '=' needs to be instantiated for generics when the type is constructed: