summary refs log tree commit diff stats
path: root/tests/collections
diff options
context:
space:
mode:
Diffstat (limited to 'tests/collections')
0 files changed, 0 insertions, 0 deletions
l&id=c9563d28a8ef3ef74826d4c211cac13301963dd5'>^
76c3b314d ^
09ab1703e ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16







                                                        


           
                               
 
                   

                              
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 = initHashSet[int]()

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