summary refs log tree commit diff stats
path: root/compiler/semtypinst.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2014-01-24 14:13:32 +0200
committerZahary Karadjov <zahary@gmail.com>2014-01-24 14:13:32 +0200
commita6a18be0899ff0445128c614f285be1924ec5281 (patch)
treea2d49244bded0fbe6c8cbdc3019c26b4cd1d51f3 /compiler/semtypinst.nim
parent3c840102bcb3daca6f7c275c2c21183be7a145cb (diff)
downloadNim-a6a18be0899ff0445128c614f285be1924ec5281.tar.gz
support for parametric user-defined type classes
Diffstat (limited to 'compiler/semtypinst.nim')
-rw-r--r--compiler/semtypinst.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index ac14179cd..a9322c1f4 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -360,7 +360,10 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
       if tfUnresolved in t.flags: result = result.base
     elif t.sonsLen > 0:
       result = makeTypeDesc(cl.c, replaceTypeVarsT(cl, t.sons[0]))
-  
+ 
+  of tyUserTypeClass:
+    result = t
+
   of tyGenericInst:
     result = instCopyType(cl, t)
     for i in 1 .. <result.sonsLen: