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

           Summary: opEquals() const results in not-covered code
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: purema...@mikevandongen.nl


--- Comment #0 from Mike van Dongen <purema...@mikevandongen.nl> 2012-11-12 
10:18:51 PST ---
When I use `bool opEquals(A o)`, the compiler says my code is completely
covered.
The 0000000 doesn't appear, nor does any other number.
Changing the method opEquals to a const results in not-covered code, while
nothing else changes.

       |void main() {}
       |
       |struct A
0000000|{
       |    bool opEquals(A o) const
       |    {
      1|        return false;
       |    }
       |    
       |    unittest
       |    {
      1|        auto a = A();
      1|        auto b = A();
      1|        assert(a != b);
       |    }
       |}

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

Reply via email to