mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
newruntime: 'owned distinct' is a valid construct (required by async)
(cherry picked from commit a85e20c125)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user