[Mono-bugs] [Bug 75873][Nor] New - mcs reports CS0019 between class and interface

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 21 21:48:11 EDT 2005


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 atsushi at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=75873

--- shadow/75873	2005-08-21 21:48:11.000000000 -0400
+++ shadow/75873.tmp.6110	2005-08-21 21:48:11.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 75873
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs reports CS0019 between class and interface
+
+Sometimes an interface could be implemented in a derived class of a base
+class C, so comparison between concrete class C and a
+hierarchically-unrelated interface I could be still valid. csc does not
+report such comparison as an error, but mcs does.
+
+
+Repro:
+
+class C
+{
+        System.ICloneable a;
+        public bool Foo ()
+        {
+                return this == a;
+        }
+}
+
+
+Actual Results:
+
+iface2.cs(6,10): error CS0019: Operator `==' cannot be applied to operands
+of type `C' and `System.ICloneable'
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+no error.
+
+How often does this happen? 
+
+consistently.


More information about the mono-bugs mailing list