This is a follow-up from https://issues.dlang.org/show_bug.cgi?id=22278. An existent Phobos unit test that can benefit from this is: https://github.com/dlang/phobos/blob/12b78bdebfe5ba55f3717f5ae1a5c81be8bac337/std/sumtype.d#L1275-L1290
@iK4tsu created dlang/dmd pull request #13896 "Fix Issue 22945 - [Conditional Compilation] support invariant version flag" fixing this issue: - test(runnable): add runnable tests for version condition D_Invariant FIX ISSUE 22945 Signed-off-by: João Lourenço <jlourenco5691@gmail.com> https://github.com/dlang/dmd/pull/13896
dlang/dmd pull request #13896 "Fix Issue 22945 - [Conditional Compilation] support invariant version flag" was merged into master: - e61b33c54147046461afb35cf619b7bc44371b8a by João Lourenço: test(runnable): add runnable tests for version condition D_Invariant FIX ISSUE 22945 Signed-off-by: João Lourenço <jlourenco5691@gmail.com> https://github.com/dlang/dmd/pull/13896