[Issue 3607] New: Problems with struct opEquals and const

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 11 06:04:21 PST 2009


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

           Summary: Problems with struct opEquals and const
           Product: D
           Version: 2.036
          Platform: x86
               URL: http://www.digitalmars.com/webnews/newsgroups.php?art_
                    group=digitalmars.D.learn&article_id=18407
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: webby at beardmouse.org.uk


--- Comment #0 from Richard Webb <webby at beardmouse.org.uk> 2009-12-11 06:04:18 PST ---
While trying to build the Juno library with DMD 2.037, i got a bunch or errors
like:

juno\com\core.d(295): Error: function juno.com.core.GUID.opEquals type
signature should be const bool(ref const(GUID)) not bool(GUID other)

Which can be replicated with:
////////////////////////////////
struct Foo
{
    bool opEquals(Foo f) const
    {
        return true;
    }
}

void Bar()
{
    Foo f;
}
//////////////////////////////// 

As mentioned in the post @
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=18407,
the error seems to have been caused by changeset 260, which was made to fix bug
3433.

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