www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11109] New: shared opAssign not colled if there is no unshared one

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

           Summary: shared opAssign not colled if there is no unshared one
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



15:21:41 MSD ---
---
struct S
{
    void* p;
//  void opAssign(S); // Uncomment to workaround the issue
    void opAssign(S) shared {  }
}


void main()
{
    S s;
    shared S ss;
    ss = s; // Error: cannot implicitly convert expression (s) of type S to
shared(S)
}
---

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