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



--- Comment #4 from Lutger <lutger.blijdest...@gmail.com> 2010-08-07 04:42:33 
PDT ---
Something else is going on, the following does fail in line with your proposal:

import std.c.stdio: printf;

struct Foo {
   int data;

   int opEquals(ref const(Foo) other) const 
   {

       printf("A");
       return this.data == other.data;
   }
}
void main() {
   int r = Foo(5) == Foo(5);
}

output: Error: function test.Foo.opEquals type signature should be const
bool(ref const(Foo)) not const int(ref const(Foo) other)

Changing opEquals to return bool makes it compile correctly.

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

Reply via email to