@@ -7,6 +7,7 @@ module Regressions (tests) where
7
7
8
8
import Control.Exception (evaluate )
9
9
import Control.Monad (replicateM )
10
+ import Data.Bits (shiftL )
10
11
import Data.Hashable (Hashable (.. ))
11
12
import Data.List (delete )
12
13
import Data.Maybe (isJust , isNothing )
@@ -24,6 +25,7 @@ import Test.Tasty.QuickCheck (testProperty)
24
25
25
26
import qualified Data.HashMap.Lazy as HML
26
27
import qualified Data.HashMap.Strict as HMS
28
+ import qualified Data.HashSet as HS
27
29
28
30
#if MIN_VERSION_base(4,12,0)
29
31
-- nothunks requires base >= 4.12
@@ -248,6 +250,18 @@ issue383 = do
248
250
249
251
#endif
250
252
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
+
251
265
------------------------------------------------------------------------
252
266
-- * Test list
253
267
@@ -277,4 +291,5 @@ tests = testGroup "Regression tests"
277
291
#ifdef HAVE_NOTHUNKS
278
292
, testCase " issue383" issue383
279
293
#endif
294
+ , testCase " issue420" issue420
280
295
]
0 commit comments