diff options
Diffstat (limited to 'compiler/sighashes.nim')
-rw-r--r-- | compiler/sighashes.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim index c69d58cd3..90c4cd18b 100644 --- a/compiler/sighashes.nim +++ b/compiler/sighashes.nim @@ -36,6 +36,7 @@ type CoOwnerSig CoIgnoreRange CoConsiderOwned + CoDistinct proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) @@ -97,7 +98,11 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) = for i in countup(0, sonsLen(t) - 1): c.hashType t.sons[i], flags of tyDistinct: - if {CoType, CoConsiderOwned} * flags == {CoType} or t.sym == nil: + if CoDistinct in flags: + if t.sym != nil: c.hashSym(t.sym) + if t.sym == nil or tfFromGeneric in t.flags: + c.hashType t.lastSon, flags + elif CoType in flags or t.sym == nil: c.hashType t.lastSon, flags else: c.hashSym(t.sym) |