On Wednesday, 25 April 2018 at 01:08:46 UTC, Arun Chandrasekaran wrote:
So I was telling my colleague that D would warn on self assignment, but found that I was wrong.

https://run.dlang.io/is/HLhtek

```
module a;

import std.stdio;

void main() {
    string a;
a = a; // Can the compiler warn at this line that there is no effect?
    writeln(a);
    return;
}
```

Are people using self assignment of structs as a way of force-running the postblit? Is there a valid use case for that?

Mike

Reply via email to