www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7429] New: Cannot append a struct type to itself even if an opOpAssign(string op : "~") is defined.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7429

           Summary: Cannot append a struct type to itself even if an
                    opOpAssign(string op : "~") is defined.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: gor boloneum.com



---
The error "Error: cannot append type Set to type Set" for a struct type Set,
which has the operator overloaded:

ref Set opOpAssign(string op : "~")(in Set set_);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 03 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7429


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |braddr puremagic.com



---
When reporting bugs, please include a complete, preferably minimal, example.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 03 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7429


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |WORKSFORME



Cannot reproduce with dmd 2.058 beta.


struct Set
{
    ref Set opOpAssign(string op : "~")(in Set set_) { return this; }
}

void main()
{
    Set s;
    s ~= s;
}

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