www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17191] New: style: require all assert's to be supplied message

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

          Issue ID: 17191
           Summary: style: require all assert's to be supplied message
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: greeenify gmail.com

`assert(0)`'s yield to a segfault without any user-friendly message.
Hence the idea is to require all assert's in Phobos (and druntime) to have a
descriptive error message in case the user ever runs into it.

At the moment there are 302 assert(0)'s without a message at Phobos.
Ideally once all assert's have been supplied with a message, a style check
should be enabled to prevent regressions.

--
Feb 16