www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3729] New: Can't define opEquals for immutable types

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

           Summary: Can't define opEquals for immutable types
           Product: D
           Version: 2.039
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tomeksowi gmail.com


--- Comment #0 from Tomasz SowiƄski <tomeksowi gmail.com> 2010-01-20 11:26:17
PST ---
immutable struct S {
    bool opEquals(ref S s) { ... }
}

The above doesn't compile, as the parameter is required to be const and the
function to be const as well and it's immutable in both cases. Since an
immmutable type can't be less than immutable such a requirement is pointless.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 20 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3729


yebblies <yebblies gmail.com> changed:

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


--- Comment #1 from yebblies <yebblies gmail.com> 2011-06-12 22:44:10 PDT ---
*** This issue has been marked as a duplicate of issue 3659 ***

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