Skip to content

Commit 4819f27

Browse files
committed
Address review comments
1 parent 792714b commit 4819f27

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ object SimpleIdentitySet {
189189
val elem = this.xs(i)
190190
var j = searchStart // search thatElems in round robin fashion, starting one after latest hit
191191
var missing = false
192-
while (!missing && elem != thatElems(j)) {
193-
j = (j + 1) % thatSize
192+
while (!missing && (elem ne thatElems(j))) {
193+
j += 1
194+
if (j == thatSize) j = 0
194195
missing = j == searchStart
195196
}
196197
if (missing) {

0 commit comments

Comments
 (0)