routez icon indicating copy to clipboard operation
routez copied to clipboard

error: function type cannot have a name

Open KonyD opened this issue 2 years ago • 2 comments

When i run my code, it gives me this error. How i can fix it?

error: function type cannot have a name
pub const HandlerFn = fn handle(Request, Response, []const u8) callconv(.Async) anyerror!void;

KonyD avatar Jan 08 '23 16:01 KonyD

Should be as easy as removing handle from the function type.

Vexu avatar Jan 09 '23 14:01 Vexu

Unfortunately that would lead to another issue:

/path/to/routez/src/routez/server.zig:46:16: error: async has not been implemented in the self-hosted compiler yet
        frame: @Frame(handleRequest),
               ^~~~~~~~~~~~~~~~~~~~~

I'm guessing there hasn't been activity on routez partially because Zig is still a bit unstable?

nahuakang avatar Jan 27 '23 18:01 nahuakang