msetin.nim 243 B

1234567891011
  1. import std/sets
  2. template foo*[T](a: T) =
  3. # proc foo*[T](a: T) = # works
  4. var s: HashSet[T]
  5. # echo contains(s, a) # works
  6. let x = a in s # BUG
  7. doAssert not x
  8. doAssert not (a in s)
  9. doAssert a notin s
  10. when isMainModule: foo(1) # works