tbind2.nim 322 B

123456789101112131415
  1. discard """
  2. errormsg: "ambiguous call"
  3. file: "tbind2.nim"
  4. line: 12
  5. """
  6. # Test the new ``bind`` keyword for templates
  7. proc p1(x: int8, y: int): int = return x + y
  8. proc p1(x: int, y: int8): int = return x - y
  9. template tempBind(x, y): untyped =
  10. (bind p1(x, y)) #ERROR_MSG ambiguous call
  11. echo tempBind(1'i8, 2'i8)