summary refs log tree commit diff stats
path: root/compiler/seminst.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-12-28 12:50:45 +0200
committerZahary Karadjov <zahary@gmail.com>2013-12-28 12:50:45 +0200
commita59f13b00dff570865201e860ea24d202b60c85a (patch)
tree931818f7a12e6ca31c8f62d46f39cc64e1804395 /compiler/seminst.nim
parenta27eb51535f9ff233b67e5bac80cc51b81c343c7 (diff)
downloadNim-a59f13b00dff570865201e860ea24d202b60c85a.tar.gz
lift generic parameters from concrete composite type classes
Diffstat (limited to 'compiler/seminst.nim')
-rw-r--r--compiler/seminst.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/seminst.nim b/compiler/seminst.nim
index 250e53ed6..ba26635a1 100644
--- a/compiler/seminst.nim
+++ b/compiler/seminst.nim
@@ -204,6 +204,8 @@ proc fixupProcType(c: PContext, genericType: PType,
       result = result.sons[0]
   of tyStatic:
     result = inst.concreteTypes[genericType.sym.position]
+  of tyGenericInst:
+    result = fixupProcType(c, result.lastSon, inst)
   of tyOpenArray, tyArray, tySet, tySequence, tyTuple, tyProc,
      tyPtr, tyVar, tyRef, tyOrdinal, tyRange, tyVarargs:
     if genericType.sons == nil: return
@@ -234,7 +236,8 @@ proc fixupProcType(c: PContext, genericType: PType,
             continue
         
         result.sons[head] = changed
-        
+        result.size = 0
+
         if result.n != nil:
           if result.n.kind == nkRecList:
             for son in result.n.sons: