www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22442] New: Unreachable statements shouldn't count to coverage

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

          Issue ID: 22442
           Summary: Unreachable statements shouldn't count to coverage
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: lsferreira169 gmail.com

statements after an `assert(0)` shouldn't be marked as coverable by the
generated coverage matrix. Similar to `if (0) { ... }` or `if (1) { return; }`
or `if (1) { assert(0); }`.

--
Oct 27 2021