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.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 26341525c..31fbc33e1 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -152,6 +152,7 @@ proc handleGenericInvokation(cl: var TReplTypeVars, t: PType): PType =
       x = lookupTypeVar(cl, x)
       if header == nil: header = copyType(t, t.owner, false)
       header.sons[i] = x
+      propagateToOwner(header, x)
       #idTablePut(cl.typeMap, body.sons[i-1], x)
   if header != nil:
     # search again after first pass:
@@ -170,6 +171,7 @@ proc handleGenericInvokation(cl: var TReplTypeVars, t: PType): PType =
     var x = replaceTypeVarsT(cl, t.sons[i])
     assert x.kind != tyGenericInvokation
     header.sons[i] = x
+    propagateToOwner(header, x)
     idTablePut(cl.typeMap, body.sons[i-1], x)
   
   for i in countup(1, sonsLen(t) - 1):