tmissingnilcheck.nim 353 B

123456789101112131415161718192021
  1. discard """
  2. disabled: true
  3. """
  4. type
  5. PFutureBase = ref object
  6. callback: proc () {.closure.}
  7. proc newConnection =
  8. iterator newConnectionIter(): PFutureBase {.closure.} =
  9. discard
  10. var newConnectionIterVar = newConnectionIter
  11. var first = newConnectionIterVar()
  12. proc cb {.closure.} =
  13. discard
  14. first.callback = cb
  15. newConnection()