more checking for --gc:arc, no need for valgrind (#14467)

* sigmatch: removed dead code
This commit is contained in:
Andreas Rumpf 2020-05-29 12:08:17 +02:00 • committed by GitHub
commit e31ac81899
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 159 additions and 73 deletions

View file

@ -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}