https://issues.dlang.org/show_bug.cgi?id=18002
RazvanN <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from RazvanN <[email protected]> --- The compiler attempts to implicitly cast to `const(char)[]`. Since the assert does not actually modify the message that should be fine, however, because the lowering to _d_assert_msg is done in the gluelayer it does not check the type of the message argument (if the frontend did not reject the code it means that the implicit cast to const(char)[] was possible). This seems a bit iffy, however, I don't see this as being a problem in @safe code. > See the code I posted in issue #18003. The compiler should reject any > attempt to pass a slice of a local variable to assert(). That behavior has now been deprecated provided that the function is marked @safe. --
