[Issue 5889] Struct literal/construction should be rvalue

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 29 21:31:01 PDT 2011


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



--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2011-04-29 21:27:14 PDT ---
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.

-- 
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