[Issue 11443] New: Misleading error for mismatch overloaded operator if there are immutable members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 5 05:51:49 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11443

           Summary: Misleading error for mismatch overloaded operator if
                    there are immutable members
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-11-05 16:51:47 MSK ---
---
struct S
{
    const int i;
    void opOpAssign(string op : "+")(int) { }
    void opOpAssign(string op : "~")(int) { }
}

void main()
{
    S s;
    s += ""; // Error: cannot modify struct s S with immutable members
    s ~= ""; // Error: cannot modify struct s S with immutable members
}
---

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


More information about the Digitalmars-d-bugs mailing list