summary refs log tree commit diff stats
path: root/compiler/semexprs.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/semexprs.nim
parent3c840102bcb3daca6f7c275c2c21183be7a145cb (diff)
downloadNim-a6a18be0899ff0445128c614f285be1924ec5281.tar.gz
support for parametric user-defined type classes
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 6e2d777fb..37fdf8b34 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -322,12 +322,12 @@ proc isOpImpl(c: PContext, n: PNode): PNode =
                                         tfIterator in t.flags))
   else:
     var match: bool
-    let t2 = n[2].typ
+    let t2 = n[2].typ.skipTypes({tyTypeDesc})
     case t2.kind
     of tyTypeClasses:
       var m: TCandidate
       initCandidate(c, m, t2)
-      match = matchUserTypeClass(c, m, emptyNode, t2, t1) != nil
+      match = typeRel(m, t2, t1) != isNone
     of tyOrdinal:
       var m: TCandidate
       initCandidate(c, m, t2)