www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20683] New: errors in static assert do not halt compilation

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

          Issue ID: 20683
           Summary: errors in static assert do not halt compilation
                    immediately
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: elpenguino+D gmail.com

```
static assert(somethingBogus);
static assert(false);
```

Normally, when a static assert's expression evaluates to false, compilation is
halted immediately. However, this doesn't happen when there is an error in the
expression.

In this situation, I would expect the appropriate error for the statement to be
issued and for compilation to halt before the second static assert is
evaluated.

--
Mar 17