https://issues.dlang.org/show_bug.cgi?id=14198
--- Comment #3 from Walter Bright <[email protected]> --- This is crazy complicated. What's happening is in TemplateInstance::needsCodegen(), the minst for to!string is set to std.bitmanip, which is not a root module, and so needsCodegen() says it should be in Phobos.lib. However, std.bitmanip never actually instantiates to!string, so it is not found in phobos.lib, and the link fails. _D3std4conv11__T2toTAyaZ9__T2toTbZ2toFbZAya is to!string So, to!string's minst is being set wrong. The wrong value is set by this code in TemplateInstance::semantic(): --------------- // If the first instantiation was speculative, but this is not: if (!inst->minst) { // Mark it is a non-speculative instantiation. inst->minst = minst; <---- here } --------------- minst is set to std.bitmanip during the evaluation of std.bitmanip.FloatRep, which calls: -------------- mixin(bitfields!( uint, "fraction", 23, ubyte, "exponent", 8, bool, "sign", 1)); --------------- which winds up calling to!string at some point with sc->minst set to std.bitmanip. I don't know why to!string is not emitted when Phobos is built. --
