Thread overview
[Issue 20368] dmd 2.089.0 Error: expression `main` is `void` and has no value
4 days ago
Andrea Fontana
4 days ago
Andrea Fontana
3 days ago
Basile-z
4 days ago
https://issues.dlang.org/show_bug.cgi?id=20368

--- Comment #1 from Andrea Fontana <trikkuz@gmail.com> ---
Digger:

digger: 36ccf092ed154a15700c2d082795bcc1ea1b8f99 is the first bad commit
commit 36ccf092ed154a15700c2d082795bcc1ea1b8f99
Author: The Dlang Bot <code+dlang-bot@dawg.eu>
Date:   Mon Aug 26 12:33:40 2019 +0200

    dmd: Merge pull request #10351 from JinShil/entry

    https://github.com/dlang/dmd/pull/10351

    Move hard-coded logic to generate C main out of the compiler and into
druntime
    merged-on-behalf-of: Nicholas Wilson
<thewilsonator@users.noreply.github.com>

diff --git a/dmd b/dmd
index 0de452558..a01aa5587 160000

--
4 days ago
https://issues.dlang.org/show_bug.cgi?id=20368

--- Comment #2 from Andrea Fontana <trikkuz@gmail.com> ---
Reduced:

module mymod;

mixin Bug;

template Bug()
{
   void main()
   {
         import std;
         alias bug = hasUDA!(__traits(getMember, mymod, "main"), "myuda");
   }
}

--
3 days ago
https://issues.dlang.org/show_bug.cgi?id=20368

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #3 from Basile-z <b2.temp@gmx.com> ---
w/o phobos:

---
module mymod;

mixin Bug;

mixin template Bug()
{
   void main()
   {
         alias Attribs = __traits(getAttributes, __traits(getMember, mymod,
"main"));
   }
}
---

--