First Draft: Static Single Assignment
Walter Bright
newshound2 at digitalmars.com
Sun Nov 23 09:25:59 UTC 2025
On 11/17/2025 2:25 AM, user1234 wrote:
> which leads to ask what is the right behavior (given first note) for
>
> ```d
> void v(final ref int);
> final int arg;
> v(arg);
> ```
This should be an error. It is equivalent to:
```d
final int arg;
ref int rarg = arg; // error
ref const(int) rarg = arg; // ok
```
I.e. a ref to a final should not be able to modify the final.
More information about the dip.development
mailing list