On Thursday, 7 August 2014 at 12:45:12 UTC, Marc Schütz wrote:
On Thursday, 7 August 2014 at 12:25:09 UTC, Dicebot wrote:
On Wednesday, 6 August 2014 at 23:01:11 UTC, Andrei Alexandrescu wrote:
Somewhat sadly, this code does compile:

shared S s1, s2;
s1 = s2;

I have no idea what semantics this may have from just reading the snippet. IMHO killing it will be a good thing and totally in line with your comments about shared you have made during DConf conversations.

Should it be allowed if `S` defines `opAssign`?

Only if `S` defines a shared `opAssign`. In matter of fact, if `S` defines a non-shared `opAssign` without defining the shared version that code won't compile(which is probably why the `Variant` case doesn't compile).

Reply via email to