Thread overview
[Issue 12546] DMD does not generate required symbols for linker
Apr 16, 2014
Tomer Filiba
Oct 30, 2014
Rainer Schuetze
Apr 12, 2018
John Colvin
April 16, 2014
https://issues.dlang.org/show_bug.cgi?id=12546

--- Comment #1 from Tomer Filiba <tomerfiliba@gmail.com> ---
Further examination shows that it's caused by the automatic addition of function attributes:

=================================
$ nm mymodule.o | grep TypedIdentifier | grep toString
_D8mymodule40__T15TypedIdentifierVAyaa6_4d7954797065Z15TypedIdentifier8toStringMxFNaNfZAya

$ nm main.o | grep TypedIdentifier | grep toString _D8mymodule40__T15TypedIdentifierVAyaa6_4d7954797065Z15TypedIdentifier8toStringMxFZAya =================================

NaNf = pure @safe (according to http://dlang.org/abi.html )

When the `alias` sits in mymodule.d, toString gets qualified with `pure @safe`, while when it's invoked in main.d, it only looks for `const`. If I move the alias into main.d, or just skip the alias and use the full type, everything's fine.

This seems like a bug in the alias mechanism of the core compiler.

--
October 30, 2014
https://issues.dlang.org/show_bug.cgi?id=12546

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario@gmx.de

--- Comment #2 from Rainer Schuetze <r.sagitario@gmx.de> ---
I guess this is another instance of Issue 10442.

--
April 12, 2018
https://issues.dlang.org/show_bug.cgi?id=12546

John Colvin <john.loughran.colvin@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.loughran.colvin@gmail.
                   |                            |com

--