tinvalid_rebind.nim 299 B

12345678910111213141516
  1. discard """
  2. joinable: false
  3. cmd: "nim check $file"
  4. errormsg: "cannot bind another '=destroy' to: Foo; previous declaration was constructed here implicitly: tinvalid_rebind.nim(12, 7)"
  5. line: 14
  6. """
  7. type
  8. Foo[T] = object
  9. proc main =
  10. var f: Foo[int]
  11. proc `=destroy`[T](f: var Foo[T]) =
  12. discard