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

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


Hello,
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,

Rodolfo

_________________________________________________________________
Send instant messages to anyone on your contact list with  MSN Messenger 
6.0.  Try it now FREE!  http://msnmessenger-download.com