@@ -7,6 +7,7 @@ module Regressions (tests) where
77
88import Control.Exception (evaluate )
99import Control.Monad (replicateM )
10+ import Data.Bits (shiftL )
1011import Data.Hashable (Hashable (.. ))
1112import Data.List (delete )
1213import Data.Maybe (isJust , isNothing )
@@ -24,6 +25,7 @@ import Test.Tasty.QuickCheck (testProperty)
2425
2526import qualified Data.HashMap.Lazy as HML
2627import qualified Data.HashMap.Strict as HMS
28+ import qualified Data.HashSet as HS
2729
2830#if MIN_VERSION_base(4,12,0)
2931-- nothunks requires base >= 4.12
@@ -248,6 +250,18 @@ issue383 = do
248250
249251#endif
250252
253+ ------------------------------------------------------------------------
254+ -- Issue #420
255+
256+ issue420 :: Assertion
257+ issue420 = do
258+ let k1 :: Int = 1 `shiftL` 10
259+ let k2 :: Int = 2 `shiftL` 10
260+ let s0 = HS. fromList [k1, k2]
261+ let s1 = s0 `HS.intersection` s0
262+ assert $ k1 `HS.member` s1
263+ assert $ k2 `HS.member` s1
264+
251265------------------------------------------------------------------------
252266-- * Test list
253267
@@ -277,4 +291,5 @@ tests = testGroup "Regression tests"
277291#ifdef HAVE_NOTHUNKS
278292 , testCase " issue383" issue383
279293#endif
294+ , testCase " issue420" issue420
280295 ]
0 commit comments