mdotlookup.nim 286 B

1234567891011121314151617
  1. proc baz(o: auto): int = 5 # if bar is exported, it works
  2. type MyObj = object
  3. x: int
  4. proc foo*(b: auto) =
  5. var o: MyObj
  6. echo b.baz, " ", o.x.baz, " ", b.baz()
  7. import sets
  8. var intset = initHashSet[int]()
  9. proc fn*[T](a: T) =
  10. if a in intset: echo("true")
  11. else: echo("false")