File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1528,8 +1528,15 @@ object Types {
1528
1528
*/
1529
1529
trait BindingType extends Type {
1530
1530
1531
- override def identityHash (bs : Binders ) =
1532
- if (bs == null ) super .identityHash(bs) else bs.hash
1531
+ override def identityHash (bs : Binders ) = {
1532
+ def recur (n : Int , tp : BindingType , rest : Binders ): Int =
1533
+ if (this `eq` tp) finishHash(hashing.mix(hashSeed, n), 1 )
1534
+ else if (rest == null ) System .identityHashCode(this )
1535
+ else recur(n + 1 , rest.tp, rest.next)
1536
+ avoidSpecialHashes(
1537
+ if (bs == null ) System .identityHashCode(this )
1538
+ else recur(1 , bs.tp, bs.next))
1539
+ }
1533
1540
1534
1541
def equalBinder (that : BindingType , bs : BinderPairs ): Boolean =
1535
1542
(this `eq` that) || bs != null && bs.matches(this , that)
You can’t perform that action at this time.
0 commit comments