<div dir="ltr"><div>So I've declared a local function:</div><div>  extern(C) void _d_assert_msg (string msg, string file, uint line)</div><div><br></div><div>Intent is to replace the druntime assert handler.</div><div>I declared this function and the program builds and links, but it still calls the druntime function.</div><div><br></div><div>1. I'm not sure exactly why linking succeeds... I would have expected a link error with multiple defined symbols...</div><div>2. That said, #1 shouldn't actually happen because the druntime symbol should be marked with weak linkage such that a user-override will be accepted when supplied, but that seems not to be the  case right now...?</div><div><br></div><div>Have people done this in their own programs? What is the best practice?</div><div><br></div><div></div><div>On a related note; 
_d_assert_msg is missing an argument; it supplies msg, line, file, but it also needs to receive another argument which is the stringified assert expression that failed.<br></div></div>