I don't see any use for it honestly, but heres one way you can do it
    
    
    type Obj = object
    
    proc fun(_: typedesc[Obj], x: int): int = x * 2
    
    doAssert Obj.fun(4) == 8
    
    
    Run

Reply via email to