Confused about class equality
strtr
strtr at spam.com
Tue Apr 6 19:41:43 PDT 2010
Justin Spahr-Summers Wrote:
>
> I think he said that he has two distinct object references, but the
> value stored in the object(s) changes by changing either one.
>
> In other words, we'd need to see the code.
I've added this exact sequence:
if( c1 !is null )
{
c1.value = 1;
if( c2 !is null )
{
c2.value = 2;
if( c1 !is c2 )
{
c1.value = 3;
assert(c2.value == 2 );
}
c2.value = 0;
}
c1.value = 0;
}
To my understanding this should never fails, yet it does.
AssertError Failure
More information about the Digitalmars-d-learn
mailing list