[Issue 14364] DMD should compile (correctly) SDC test0167.d

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Mar 30 11:31:00 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14364

--- Comment #8 from deadalnix <deadalnix at gmail.com> ---
(In reply to Kenji Hara from comment #6)
> (In reply to deadalnix from comment #5)
> > Reopening. The spec is wrong. It has been discussed many time that should
> > have LTR semantic.
> 
> Can you list the links to the discussions?

So I reached to Andrei to know the exact details. It turns out this is a point
where Andrei and Walter are not in agreement.

Andrei advocate for LTR all the way down (as SDC do) and Walter does seems to
be inclined to specify it precisely for calls.

Anyway, as per spec, a += k is rewritten as

a = cast(typeof(a)) (a + k);

See http://dlang.org/expression.html, Assignment Operator Expressions for
reference.

So I think that, even by Walter's standards, as this is not a call, this should
be well defined.

I opened a thread on the newgroup:
http://forum.dlang.org/thread/dqkqvnkgxkxncyvyitid@forum.dlang.org#post-dqkqvnkgxkxncyvyitid:40forum.dlang.org

--


More information about the Digitalmars-d-bugs mailing list