packedsets fix regression introduced in #15564 (#16060)

* packedsets fix regression introduced in #15564

* add tests
This commit is contained in:
Timothee Cour
2020-11-19 23:07:51 -08:00
committed by GitHub
parent 59332ec235
commit 109cc45398
3 changed files with 25 additions and 8 deletions

10
tests/stdlib/mintsets.nim Normal file
View File

@@ -0,0 +1,10 @@
import std/intsets
proc test1*[]() =
let a = initIntSet()
doAssert len(a) == 0
proc test2*[]() =
var a = initIntSet()
var b = initIntSet()
a.incl b

View File

@@ -0,0 +1,6 @@
import ./mintsets
block: # bug https://github.com/nim-lang/Nim/pull/15564#issuecomment-729878104
# related to bug #11167
test1()
test2()