summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-10-02 15:51:33 +0200
committerAraq <rumpf_a@web.de>2018-10-02 16:18:16 +0200
commitae901b327246f66c4082d09fedbc35ee6a42421b (patch)
treec012b7fec0263851dd2e8e71bf46a3b90fde0110 /compiler
parentf98352a49800b5b8536af49af3bcee0ca6b54a44 (diff)
downloadNim-ae901b327246f66c4082d09fedbc35ee6a42421b.tar.gz
fixes #7351
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sigmatch.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 407e34619..e0fa74db5 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -1376,6 +1376,7 @@ proc typeRelImpl(c: var TCandidate, f, aOrig: PType,
 
   of tyGenericInst:
     var prev = PType(idTableGet(c.bindings, f))
+    let origF = f
     var f = if prev == nil: f else: prev
 
     let roota = a.skipGenericAlias
@@ -1433,7 +1434,8 @@ proc typeRelImpl(c: var TCandidate, f, aOrig: PType,
 
         result = isNone
     else:
-      result = typeRel(c, lastSon(f), a)
+      assert lastSon(origF) != nil
+      result = typeRel(c, lastSon(origF), a)
       if result != isNone and a.kind != tyNil:
         put(c, f, a)