On 12/10/19 10:43 AM, Erdem wrote:
On Tue, 10 Dec 2019 14:04:05 +0100, Sönke Ludwig wrote:```
There is a typo in the package name - the folder is named "hayvan",
whereas the module declaration says "havyan".Thanks. But after making the necessary changes I still get the following error:
/home/erdem/.dub/packages/vibe-d-0.8.6/vibe-d/http/vibe/http/server.d(269,9): Error: cannot implicitly convert expression __lambda1 of type void delegate(scope HTTPServerRequest req, scope HTTPServerResponse res) @system to void delegate(scope HTTPServerRequest req, scope HTTPServerResponse res) @safe /home/erdem/.dub/packages/vibe-d-0.8.6/vibe-d/http/vibe/http/server.d(269,9): Error: cannot implicitly convert expression __lambda1 of type void delegate(scope HTTPServerRequest req, scope HTTPServerResponse res) @system to void delegate(scope HTTPServerRequest req, scope HTTPServerResponse res) @safe source/app.d(8,27): Error: template instance vibe.http.server.staticTemplate!"index.dt" error instantiating
We have access to toUpper() function within the html template. So we should also be able to access another function defined in a module, right?
I have a feeling it's because your isim
function is not declared
@safe. Because it's not a template, it doesn't get inferred safety. I
think this then cascades to some code that is being generated by the
diet parser (i.e. the __lambda1).
Try marking it safe and see what happens.
-Steve