No need for version expression is a lie

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Aug 24 21:58:17 UTC 2023


On 25/08/2023 9:26 AM, Walter Bright wrote:
> On 8/24/2023 1:51 PM, Richard (Rikki) Andrew Cattermole wrote:
>> ```d
>> void func() {
>>      static assert(false);
>> }
>> ```
>>
>> As long as you don't call func, it won't fire.
> 
> The static assert will fail at compile time. `assert(0)` will fail at 
> run time.
> 

Currently yes. I proposed a change where it requires some form of usage 
or would have contributed towards some usage. Basically a deferment of 
failing.


More information about the Digitalmars-d mailing list