summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorandri lim <jangko128@gmail.com>2017-04-01 02:58:26 +0700
committerAndreas Rumpf <rumpf_a@web.de>2017-03-31 21:58:26 +0200
commit2f9a698e8749f087a2c28a75f87e273aa14bc0fa (patch)
treee130dac117c88d732973065a687181b98ecad116 /compiler
parentfce4b7cd6216cb1f3f195cfdefc4c16da37958fd (diff)
downloadNim-2f9a698e8749f087a2c28a75f87e273aa14bc0fa.tar.gz
attempt to fix #5632 typedesc typeRel regression (#5634)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sigmatch.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index ff7b0ae72..4661abda0 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -1268,7 +1268,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
         # crossing path with metatypes/aliases, so we need to separate them
         # by checking sym.id
         let genericSubtype = isGenericSubType(c, x, f, depth, f)
-        if not (genericSubtype and aobj.sym.id != fobj.sym.id):
+        if not (genericSubtype and aobj.sym.id != fobj.sym.id) and aOrig.kind != tyGenericBody:
           depth = -1
 
       if depth >= 0: