Bug 9010 – opEquals() const results in not-covered code
Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-11-12T10:18:00Z
Last change time
2012-11-17T20:52:56Z
Assigned to
nobody
Creator
puremagic
Comments
Comment #0 by puremagic — 2012-11-12T10:18:51Z
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);
| }
|}
Comment #1 by github-bugzilla — 2012-11-17T20:09:26Z