No main() Error

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Feb 4 09:25:14 UTC 2025


On 04/02/2025 10:20 PM, Richard (Rikki) Andrew Cattermole wrote:
> Syntax does not play a role in this.

I should clarify this, the compiler already has functions for checking 
if a function is a main function.

https://github.com/dlang/dmd/blob/89b93e8b0952e8bf5dd73020a23cd7cb1897adcb/compiler/src/dmd/func.d#L595

It looks like it can work without semantic analysis having been done too.



More information about the dip.ideas mailing list