On Monday, 1 December 2025 at 03:39:22 UTC, user1234 wrote:

Yes, see https://dlang.org/dmd-linux.html#switch-check.

-check=[assert|bounds|in|invariant|out|switch ][=[on|off]]
Overrides default, -boundscheck, -release and -unittest options to enable or disable specific checks.
assert: assertion checking
bounds: array bounds
in: in contracts
invariant: class/struct invariants
out: out contracts
switch: final switch failure checking
on or not specified: specified check is enabled.
off: specified check is disabled.

If I wanted only in and switch "checked" would I add two -check arguments to CLI as
```
$ dub build -check=in=on -check=switch=on
```

or some other magic incantation?

Reply via email to