EndeavourOS/Arch x86_64, dmd 2.107.0, ldc 1.36.0, also 1.37.0-beta1. The messages of asserts thrown during CTFE are replaced with "null" iff they were derived from a thrown exception's message and iff the program is built with -dip1008 enabled. ```d #!/usr/bin/env dub /+ dub.sdl: name "app" dflags "-dip1008" +/ void main() {} static immutable ctfeThing = { try { throw new Exception("message"); } catch (Exception e) { assert(0, e.msg); } return 0; }(); ``` ``` app.d(17,9): Error: null app.d(20,2): called from here: `(*function () pure nothrow @nogc @safe => 0)()` Error /usr/bin/dmd failed with exit code 1. ``` Expected is "Error: message", and you do get that if you disable -dip1008.
The behaviour changed in 2.101, before which the error message was `"message"[0..7]`. ``` $ dub build --compiler=2.100/dmd 2>&1 | grep 'Error:' source/app.d(17,9): Error: `"message"[0..7]` $ dub build --compiler=2.101/dmd 2>&1 | grep 'Error:' source/app.d(17,9): Error: `null` ```
I can confirm regression: ``` 2.085.1 to 2.100.2: Failure with output: onlineapp.d(25): Error: static assert: "Incorrect format specifier for range: %d" Since 2.101.2: Success and no output ```