On Monday, July 08, 2013 23:31:14 Ugbar Ikenaki wrote:
> Also…Rat is a struct, not a class. Herein might lie the problem.

So, this is Rat's opCmp, correct? If it's a struct, it makes no sense for it 
to take an Object. Object is the base class for all classes and has nothing to 
do with structs. opCmp needs to take Rat, not Object. And to be fully 
functional, you might need to have a ref overload as well (since sometimes the 
compiler and runtime get overly picky about exact signatures - which is slowly 
getting fixed fortunately). So, something like this should work:

int opCmp(Rat other)
{
    return this.opCmp(other);
}

int opCmp(ref Rat other)
{
    //do stuff for comparison
}

- Jonathan M Davis

Reply via email to