From ce9eaee303a1ef253a164306a64ecfdbaf4241f2 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 9 Jul 2019 15:23:46 +0200 Subject: [PATCH] newruntime: 'owned distinct' is a valid construct (required by async) (cherry picked from commit a85e20c1258dd1b29c15e785e570c4b002ed1100) --- compiler/sigmatch.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index bff7d941be..c37151a8f4 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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