summary refs log blame commit diff stats
path: root/tests/generics/mdotlookup.nim
blob: 2984574c2542076b01339f4d8844f0ebceef31a0 (plain) (tree)
1
2
3
4
5
6
7
8







                                                        




                           
                   

                              
proc baz(o: any): int = 5 # if bar is exported, it works

type MyObj = object
  x: int

proc foo*(b: any) =
  var o: MyObj
  echo b.baz, " ", o.x.baz, " ", b.baz()

import sets

var intset = initSet[int]()

proc fn*[T](a: T) =
  if a in intset: echo("true")
  else: echo("false")