tinvalidborrow.nim 188 B

123456789101112131415161718
  1. discard """
  2. line: 11
  3. errormsg: "no symbol to borrow from found"
  4. """
  5. # bug #516
  6. type
  7. TAtom = culong
  8. proc `==`*(a, b: TAtom): bool {.borrow.}
  9. var
  10. d, e: TAtom
  11. echo( $(d == e) )