[Issue 5889] Struct literal/construction should be rvalue

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 30 03:48:13 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5889


kennytm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kennytm at gmail.com


--- Comment #2 from kennytm at gmail.com 2011-04-30 03:44:08 PDT ---
(In reply to comment #1)
> Send pull request:
> https://github.com/D-Programming-Language/dmd/pull/41
> 
> After pull requested, I thought this request may be too early to fix. This fix
> may break some existing codes.
> 
> Example:
> ----
> struct S {
>   int val;
>   bool opEquals(ref const(S) rhs) const {
>     return val == rhs.val;
>   }
> }
> void main() {
>   S s = S(10);
>   assert(s == S(10));  // if S(10) changes from lvalue to rvalue,
>                        // this line makes error.
> }
> ----
> 
> Should fix struct opEquals signature problem before fixing this issue.

So, it depends on bug 3659?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list