opEquals optimized away?
Manfred Nowak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon May 4 21:09:02 PDT 2015
class C{
override bool opEquals( Object o){
return true;
}
}
unittest{
auto c= new C;
assert( c == c);
}
`rdmd --main -unittest -cov' shows, that opEquals is not
executed. Why?
-manfred
More information about the Digitalmars-d-learn
mailing list