summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
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)