https://issues.dlang.org/show_bug.cgi?id=12546
--- Comment #1 from Tomer Filiba ---
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.
--