[Mono-bugs] [Bug 82676][Blo] New - [GMCS] Compiler error with the '==' operator when comparing interface reference against class reference
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Sep 3 14:53:11 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by rodrigobamboo at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82676
--- shadow/82676 2007-09-03 14:53:11.000000000 -0400
+++ shadow/82676.tmp.31389 2007-09-03 14:53:11.000000000 -0400
@@ -0,0 +1,50 @@
+Bug#: 82676
+Product: Mono: Compilers
+Version: 1.2
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: rodrigobamboo at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] Compiler error with the '==' operator when comparing interface reference against class reference
+
+Compile the following code with gmcs:
+
+public interface IContainer
+{
+}
+
+public interface IExtContainer : IContainer
+{
+}
+
+public abstract class ObjectContainerBase : IContainer
+{
+}
+
+public class Program
+{
+ public static void Main(string[] args)
+ {
+ IExtContainer e = null;
+ ObjectContainerBase b = null;
+ System.Console.WriteLine(e == b);
+ }
+}
+
+It fails with:
+
+Operator `==' cannot be applied to operands of type `IExtContainer' and
+'ObjectContainerBase'
+
+Expected result:
+
+No errors.
More information about the mono-bugs
mailing list