version(assert) is negated by -unittest at all actually: import std.stdio; void main() { version ( assert ) { writeln("errr"); } } $ rdmd -release test.d $ rdmd -release -unittest test.d errr That is so bad >_<