Thread overview
[Issue 22042] shared(delegate[]) causes dmd to fail
Nov 05, 2021
Dlang Bot
June 20, 2021
https://issues.dlang.org/show_bug.cgi?id=22042

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |backend
                 CC|                            |moonlightsentinel@disroot.o
                   |                            |rg
           Hardware|x86                         |All
                 OS|Mac OS X                    |All
           Severity|major                       |normal

--- Comment #1 from moonlightsentinel@disroot.org ---
Tagged as backend because the error happens in the DMD-specific glue layer (run.dlang.io suggests an assertion failure in todt.c)

--
November 05, 2021
https://issues.dlang.org/show_bug.cgi?id=22042

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|backend                     |

--- Comment #2 from moonlightsentinel@disroot.org ---
Actually not a backend issue, the error is caused by a missing deco for the `TypeDelegate` which wasn't set by merge.

--
November 05, 2021
https://issues.dlang.org/show_bug.cgi?id=22042

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression

--- Comment #3 from moonlightsentinel@disroot.org ---
Worked up until 2.064 according to run.dlang.io

--
November 05, 2021
https://issues.dlang.org/show_bug.cgi?id=22042

--- Comment #4 from moonlightsentinel@disroot.org ---
Further reduction:


shared(void delegate()[]) onRelease;

void main()
{
        onRelease ~= (){};
}

--
November 05, 2021
https://issues.dlang.org/show_bug.cgi?id=22042

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
@MoonlightSentinel created dlang/dmd pull request #13271 "Fix 22042 - Merge `funcptr` type before merging `TypeDelegate`'s" fixing this issue:

- Fix 22042 - Merge `funcptr` type before merging `TypeDelegate`'s

  Ensures that `deco` is set for the `funcptr` (`next`) whenever possible
  s.t. `merge` doesn't exit early in the `default` case.

  Previously `TypeDelegate`s without `deco` could reach the `TypeInfo`
  generation and trigger the assertion due to the missing mangling string.
  Also could cause problems with non-unique types but didn't find a
  test case (yet?).

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

--
December 13
https://issues.dlang.org/show_bug.cgi?id=22042

--- Comment #6 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19948

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--