newruntime: 'owned distinct' is a valid construct (required by async)

This commit is contained in:
Araq
2019-07-09 15:23:46 +02:00
parent fa982b43f0
commit a85e20c125

View File

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