fix #17385, len must be declared before items (#17386)

This commit is contained in:
Miran
2021-03-15 18:45:10 +01:00
committed by GitHub
parent 51a04a3674
commit 40a5d6537a
3 changed files with 36 additions and 21 deletions

11
tests/sets/m17385.nim Normal file
View File

@@ -0,0 +1,11 @@
import std/sets
type
Diff*[T] = object
data: T
proc test*[T](diff: Diff[T]) =
var bPopular = initHashSet[T]()
for element in bPopular.items():
echo element

4
tests/sets/t17385.nim Normal file
View File

@@ -0,0 +1,4 @@
import m17385
let a = Diff[int]()
a.test()