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
commit 40a5d6537a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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()