[Issue 13574] incorrect code for assignment to dollar in slice expression
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Oct 5 07:16:59 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13574
hsteoh at quickfur.ath.cx changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at quickfur.ath.cx
--- Comment #1 from hsteoh at quickfur.ath.cx ---
According to the current spec, the result of opDollar is cached:
http://dlang.org/operatoroverloading.html#dollar
(FYI, I was responsible for that particular note, under request by Kenji.)
I think assigning to $ in a slice expression should be illegal, since it leads
to unclear semantics, e.g., what should arr[($=2) + ($=1)] mean?
--
More information about the Digitalmars-d-bugs
mailing list