Why use a DFA instead of DIP1000?
IchorDev
zxinsworld at gmail.com
Sat Sep 13 14:34:59 UTC 2025
On Saturday, 13 September 2025 at 13:06:06 UTC, kdevel wrote:
> Please note that the program is not run but just compiled.
What does that even mean?
> I thought that the intent of the original code
>
> ```d
> void func(bool b, scope int* p) @safe {
> assert(!b);
>
> if (b) {
> ptr = p; // Error: scope variable `p` assigned to global
> variable `ptr`
> }
> }
> ```
>
> was to show that there is some code-block
>
> ```d
> ptr = p; // Error: scope variable `p` assigned to global
> variable `ptr`
> ```
>
> which is never executed regardless of the value of `b`.
Then you clearly didn't read the function beforehand.
More information about the Digitalmars-d
mailing list