D-Programming-Language/phobos — pull request #1963 by Kapps (2014-02-24 05:47:20+00:00)
Title: Fix issue 12157 - Variant opEquals always returns false for classes.

Previously checked for is(typeof(A.init == A.init)) which is an error for classes as it's a comparison to null. Same applies for opCmp.

Also includes minor refactoring as a separate commit as the comparison was copy and pasted twice previously (once for no conversion, once for implicit conversion), and this pull expanded it further resulting in further copy and pasted code.

A work-around for bug 12164 was required, which caused the equals check to return false with -m64 -O and thus fail unittests. Once that issue is fixed, I'll make a pull to remove this work-around.