Skip to content

Commit 09fc620

Browse files
committed
Correct comment
1 parent 6bcea00 commit 09fc620

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/util/GenericHashMap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ abstract class GenericHashMap[Key <: AnyRef, Value >: Null <: AnyRef]
106106
do
107107
if isDense
108108
|| index(hole - index(hash(k))) < limit * 2
109-
// hash(k) is then logically at or after hole; can be moved forward to fill hole
109+
// hash(k) is then logically at or before hole; can be moved forward to fill hole
110110
then
111111
table(hole) = k
112112
table(hole + 1) = valueAt(idx)

compiler/src/dotty/tools/dotc/util/HashSet.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ class HashSet[T >: Null <: AnyRef](initialCapacity: Int = 8, capacityMultiple: I
109109
e != null && (isDense || index(hash(e)) != idx)
110110
do
111111
if isDense
112-
|| index(hole - index(hash(k))) < limit
113-
// hash(k) is then logically at or after hole; can be moved forward to fill hole
112+
|| index(hole - index(hash(e))) < limit
113+
// hash(k) is then logically at or before hole; can be moved forward to fill hole
114114
then
115115
table(hole) = e
116116
hole = idx

0 commit comments

Comments
 (0)