This commit is contained in:
Andreas Rumpf 2019-07-13 07:55:56 +02:00 • committed by GitHub
commit de1ede77fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -1293,7 +1293,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
inc(c.inheritancePenalty, depth)
result = isSubtype
of tyDistinct:
skipOwned(a)
a = a.skipTypes({tyOwned, tyGenericInst, tyRange})
if a.kind == tyDistinct:
if sameDistinctTypes(f, a): result = isEqual
#elif f.base.kind == tyAnything: result = isGeneric # issue 4435