Summary: Regression(2.059 Beta): struct opEquals broken
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Nick Sabalausky <> 2012-04-05 
17:35:31 PDT ---
struct Foo
    const bool opEquals(ref const Foo b)
        return true;

void main()
    assert( Foo() == Foo() );

>dmd testOpCmp.d
testOpCmp.d(11): Error: function testOpCmp.Foo.opEquals (ref const(Foo) b) is
not callable using argument types (Foo)
testOpCmp.d(11): Error: Foo() is not an lvalue

It works if Foo is changed to a class.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to