Some code that compiles but shouldn't

uranuz neuranuz at
Mon Dec 30 19:51:05 UTC 2019

On Monday, 30 December 2019 at 19:09:13 UTC, MoonlightSentinel 
> On Monday, 30 December 2019 at 18:18:49 UTC, uranuz wrote:
>> So as you see I have added a lot of enforce to test if all 
>> variables are not null. But nothing was null and the reason of 
>> segfault were unclear.
> What about moduleName, mod and the return value of 
> mod.toStdJSON()?
> And whats the return type of ctx.response.write? (Returning a 
> void expression is allowed and avoids some special casing in 
> generic code)

OK. This example compiles...

void bar() {}

void main()
     return bar();

More information about the Digitalmars-d-learn mailing list