[Issue 23728] New: Add `version(debug)`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 21 10:54:02 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23728

          Issue ID: 23728
           Summary: Add `version(debug)`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: qs.il.paperinik at gmail.com

Code controlled by `version(debug)` is compiled in when the `-debug` flag is
passed to the compiler.

Although `debug` is conditional compilation on its own, it also allows
statements that would otherwise not be allowed, e.g. impure statements in
`pure` functions, and `version(debug)` would have no special exceptions like
that.

--


More information about the Digitalmars-d-bugs mailing list