[Issue 20683] New: errors in static assert do not halt compilation immediately

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 17 19:47:32 UTC 2020


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 at puremagic.com
          Reporter: elpenguino+D at 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.

--


More information about the Digitalmars-d-bugs mailing list