[Mono-list] Possible mcs bug: CS0019 detected for comparable instances

Rodolfo Campero rodolfocampero@hotmail.com
Sat, 18 Oct 2003 13:23:12 +0000

Thanks Dave and Rahul for validate this problem.
I already filed a bug report.
I think the problem may be related to this snippet taken from ECMA-334,
section 14.9.6:

"It is a compile-time error to use the predefined reference type equality
"operators to compare two references that are known to be different at
"compile-time. For example, if the compile-time types of the operands
"are two class types A and B, and if neither A nor B derives from the
"other, then it would be impossible for the two operands to reference
"the same object. Thus, the operation is considered a compile-time error.

Maybe the implementation considers an interface as a regular class,
and given the fact that the base class doesn't implement it, mcs complains
with CS0019; but in fact nothing can be said about an instance referenced
through an interface.

Just my 2 cents in my lurker opinion, I didn't even looked at the code...

Greetings and thanks again,


The new MSN 8: smart spam protection and 2 months FREE*