mail-archives/mono-list/2003-October/016492.html

104 строки
3.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-list] Possible mcs bug: CS0019 detected for comparable instances
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:rodolfocampero%40hotmail.com">
<META NAME="robots" CONTENT="index,nofollow">
<LINK REL="Previous" HREF="016498.html">
<LINK REL="Next" HREF="016504.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-list] Possible mcs bug: CS0019 detected for comparable instances
</H1>
<B>Rodolfo Campero
</B>
<A HREF="mailto:rodolfocampero%40hotmail.com"
TITLE="[Mono-list] Possible mcs bug: CS0019 detected for comparable instances">rodolfocampero@hotmail.com
</A><BR>
<I>Sat, 18 Oct 2003 00:19:01 +0000</I>
<P><UL>
<LI> Previous message: <A HREF="016498.html">[Mono-list] apache selective serving
</A></li>
<LI> Next message: <A HREF="016504.html">[Mono-list] Possible mcs bug: CS0019 detected for comparable
instances
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#16492">[ date ]</a>
<a href="thread.html#16492">[ thread ]</a>
<a href="subject.html#16492">[ subject ]</a>
<a href="author.html#16492">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Hello,
I'm trying to port an application I'm developing at work. Over there we use
Microsoft .Net SDK.
When I tried to compile it in mono I got:
error CS0019: Operator != cannot be applied to operands of type `xxx' and
`yyy'
I've narrowed down the problem and the smallest program which reproduces the
error is the following one:
using System;
namespace Test {
public class Test {
public static void Main(string[] args) {
BaseClass baseRef = new DerivedClass();
ITest interfaceRef = (ITest)baseRef;
Console.WriteLine(&quot;Is this wrong? {0}&quot;, (interfaceRef!=baseRef));
}
}
public interface ITest {}
public class BaseClass {}
public class DerivedClass: BaseClass, ITest {}
}
Actually, I haven't checked this narrowed-down version in Windows, so if a
gentle soul can do this for me in order to prove that it works I'll
appreciate
it.
I've searched bugzilla for this bug but I didn't found it. If it's right to
you, I'll file a bug report after someone verify that the code works in
Windows.
I'm using a recent CVS version of mcs and mono, in a RedHat 9 box.
I have a workaround for this problem, so I'm not pressed with this one...
just
wanted to let you know.
Thanks in advance,
Rodolfo
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
<A HREF="http://join.msn.com/?page=features/featuredemail">http://join.msn.com/?page=features/featuredemail</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI> Previous message: <A HREF="016498.html">[Mono-list] apache selective serving
</A></li>
<LI> Next message: <A HREF="016504.html">[Mono-list] Possible mcs bug: CS0019 detected for comparable
instances
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#16492">[ date ]</a>
<a href="thread.html#16492">[ thread ]</a>
<a href="subject.html#16492">[ subject ]</a>
<a href="author.html#16492">[ author ]</a>
</LI>
</UL>
</body></html>