[Issue 17226] Exception during the generation of an assert message hides AssertError

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 18 23:12:33 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=17226

hsteoh at qfbox.info changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at qfbox.info

--- Comment #6 from hsteoh at qfbox.info ---
Just use compile-time format string checking:

          assert(myAssumption, format!"%s doesn't work!"(blah));

This produces a compile error:

          string s = format!"blah %d blah"(123.45);

Problem solved.

--


More information about the Digitalmars-d-bugs mailing list