[Issue 11008] Allow -main switch even if user-defined main function exists

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 1 19:34:03 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=11008

John Hall <john.michael.hall at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.michael.hall at gmail.com

--- Comment #8 from John Hall <john.michael.hall at gmail.com> ---
@ZombieDev As a heads up, following [1], the following code in run.dlang.org
[2] produces the only one main error due to relying on dub test --single.

```d
/+dub.sdl:
dependency "mir-algorithm" version="*"
+/

import core.stdc.stdio;

unittest
{
    printf("From unittest\n");
}

void main()
{
    printf("From main\n");
}
```

[1] https://github.com/dlang-tour/core-exec/pull/56
[2] https://run.dlang.io/is/0PlIZU

--


More information about the Digitalmars-d-bugs mailing list