[Issue 21255] "overload alias ... forward declaration" when overload set of imported template functions is passed to alias template parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 16 10:03:28 UTC 2020


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

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #11740 "Fix issue 21255: Mangle aliased overload set
passed to template alias parameter." was merged into master:

- d6f7073b1dfc7380140a676799a7d430a8e4051a by Mathis Beer:
  Fix issue 21255: Ignore overload declarations when checking for mangling
specialcases for template parameters.

  The problem is that overload declarations are kind of "fake declarations"
  without many of the properties DMD expects from ordinary declarations. So
  when we try to mangle them, DMD thinks they're "default" linkage, because
  that's LINK.init, and then it errors with "forward declaration" because
  I guess that can't happen normally?

  Anyways, there's already code for mangling an overload set; we just have
  to avoid crashing until we reach it.

  So now the commit just bypasses the bit that checks for special cases in
  declarations, ie. pragma(mangle) and extern(C).

  Why doesn't the handler for Declaration do all this?




More information about the Digitalmars-d-bugs mailing list