RFC: Change what assert does on error
Timon Gehr
timon.gehr at gmx.ch
Sat Jul 5 21:22:01 UTC 2025
On 7/4/25 23:21, Timon Gehr wrote:
> On 7/4/25 09:24, Walter Bright wrote:
>>
>> 2. code that is not executed is not vulnerable to attack
>
> ```d
> void foo(){
> openDoor();
> performWork();
> scope(exit){
> closeDoor();
> lockDoor();
> }
> }
> ```
Should have been:
```d
void foo(){
scope(exit){
closeDoor();
lockDoor();
}
openDoor();
performWork();
}
```
More information about the Digitalmars-d
mailing list