Guest User

Untitled

a guest
Jun 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. proc myIntProc(x: int, y: int): int = x*2
  2.  
  3. proc myIntProc(x: int): string = $x
  4.  
  5. template typeTest(myCall:untyped): untyped =
  6. let something: int = myCall
  7.  
  8. when(compiles(typeTest(myIntProc(5, 5)))):
  9. let a = myIntProc(5, 5)
  10. else:
  11. let a = -1
  12.  
  13. echo a
Add Comment
Please, Sign In to add comment