[Issue 17729] dmd says cast expression is "not an lvalue", but it can be used as one in other contexts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 19 16:39:33 UTC 2018


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

--- Comment #2 from ag0aep6g <ag0aep6g at gmail.com> ---
(In reply to er.krali from comment #1)
> I also can't understand why the workaround works at all, the result of
> dereferencing a pointer should surely be a rvalue?
> 
> Is that also a bug?

Dereferencing a pointer gives an lvalue. If it gave an rvalue, pointers would
be pretty useless. You couldn't assign through them.

If you disagree or have more questions on this, I'd suggest making a thread on
D.learn [1]. We're going off topic here.


[1] https://forum.dlang.org/group/learn

--


More information about the Digitalmars-d-bugs mailing list