Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- TestType = object
- p: proc(x: string, y: int): int {.closure.}
- when isMainModule:
- proc tproc(x: string, y: int): int =
- echo x
- echo $y
- let t = TestType(p: tproc)
- discard t.p("a", 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement