improve the error message for 'addQuitProc' etc; fixes #5794

This commit is contained in:
Araq 2018-09-03 12:27:23 +02:00
commit 1abef2dc59
2 changed files with 14 additions and 13 deletions

View file

@ -5,7 +5,8 @@ nimout: '''
type mismatch: got <AsyncHttpServer, Port, proc (req: Request): Future[system.void]{.locks: <unknown>.}>
but expected one of:
proc serve(server: AsyncHttpServer; port: Port;
callback: proc (request: Request): Future[void]; address = ""): Future[void]
callback: proc (request: Request): Future[void] {.closure, gcsafe.};
address = ""): Future[void]
first type mismatch at position: 3
required type: proc (request: Request): Future[system.void]{.closure, gcsafe.}
but expression 'cb' is of type: proc (req: Request): Future[system.void]{.locks: <unknown>.}