summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r--compiler/sigmatch.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 401d160fa..e99269c41 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -993,6 +993,11 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
   result = isNone
   assert(f != nil)
 
+  when declared(deallocatedRefId):
+    let corrupt = deallocatedRefId(cast[pointer](f))
+    if corrupt != 0:
+      quit "it's corrupt " & $corrupt
+
   if f.kind == tyUntyped:
     if aOrig != nil: put(c, f, aOrig)
     return isGeneric
@@ -1409,7 +1414,6 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
     let roota = a.skipGenericAlias
     let rootf = f.skipGenericAlias
 
-    var m = c
     if a.kind == tyGenericInst:
       if roota.base == rootf.base:
         let nextFlags = flags + {trNoCovariance}