Inconsistent behaviour static assert directly or via mixin?

Julian Fondren julian.fondren at gmail.com
Mon Mar 23 18:14:45 UTC 2026


On Monday, 23 March 2026 at 18:06:35 UTC, DLearner wrote:
> If run, produces 'Indirect' message _and nothing else_.
>
> Now remove the '//', get 'Direct' message _and code dump_.
>
> Inconsistent behaviour?

I don't get a code dump from either with ldc2. With gdc, there's 
only this extra output:

```
    12 |     static assert(false, "Direct");
       |     ^
```

In both cases the indirect error is reported as coming from a 
temporary file, probably that file doesn't exist by the time this 
extra output is sought.


More information about the Digitalmars-d-learn mailing list