[Issue 20368] dmd 2.089.0 Error: expression `main` is `void` and has no value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 8 10:06:47 UTC 2019


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

Mike Franklin <slavo5150 at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slavo5150 at yahoo.com

--- Comment #4 from Mike Franklin <slavo5150 at yahoo.com> ---
The `main` in `core/internal/entrypoint.d` and the `main` created by the user
in their module results in an `OverloadSet`.  When the user invokes
`__traits(getMember, usersModule, "main")` the overload set is returned which
evaluates to `void`.

Working on a fix at https://github.com/dlang/druntime/pull/2861, but I'm not
sure if it will work.

--


More information about the Digitalmars-d-bugs mailing list