Skip to content

Commit 1607e71

Browse files
committed
Add a note to submapBitmapIndexed
1 parent dadb590 commit 1607e71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Data/HashMap/Internal.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,9 @@ submapBitmapIndexed comp !b1 !ary1 !b2 !ary2 = subsetBitmaps && go 0 0 (b1Orb2 .
15561556
where
15571557
go :: Int -> Int -> Bitmap -> Bool
15581558
go !i !j !m
1559+
1560+
-- Note: m can overflow to 0 when maxChildren == WORD_SIZE_IN_BITS. See
1561+
-- #491. In that case there needs to be a check '| m == 0 = True'
15591562
| m > b1Orb2 = True
15601563

15611564
-- In case a key is both in ary1 and ary2, check ary1[i] <= ary2[j] and

0 commit comments

Comments
 (0)