Is there a way to statically reflect on proc's in scope that accept some object as their first argument? For example, I'd like to do something like:
# module M1:
type
O = object
proc p1(o:O) = discard
proc p2(o:O) = discard
# module M2
import M1, typetraits
func p3(o:O,i:int) = discard
static:
var o : O
for name,_ in o.functions: # <-- this is what I'm looking for
echo name
which prints at compile time:
p1
p2
p3