[Mono-bugs] [Bug 28369][Nor] New - Operator != applied to incompatible operands compile!
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
30 Jul 2002 19:27:44 -0000
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 gonzalo@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=28369
--- shadow/28369 Tue Jul 30 15:27:44 2002
+++ shadow/28369.tmp.21917 Tue Jul 30 15:27:44 2002
@@ -0,0 +1,44 @@
+Bug#: 28369
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gonzalo@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Operator != applied to incompatible operands compile!
+
+Ricardo Cárdenas reported this.
+
+Steps to reproduce the problem:
+1. Test case:
+using System;
+public class Test
+{
+ enum A { cero,uno }
+
+ static void Main ()
+ {
+ Test t = new Test ();
+ A a = A.uno;
+
+ if (a != t)
+ throw new Exception ("This should not compile");
+ }
+}
+
+
+Actual Results:
+Compilation succeeded
+
+Expected Results:
+error CS0019: Operator '!=' cannot be applied to operands of type 'Test.A'
+and 'Test'