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 [EMAIL PROTECTED]

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

--- shadow/75557        2005-07-15 10:45:34.000000000 -0400
+++ shadow/75557.tmp.30361      2005-07-15 10:45:34.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 75557
+Product: Mono: Compilers
+Version: 1.0
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CS0252/CS0253 are not reported when performing reference comparison
+
+Mcs currently does not report CS0252/CS0253 when comparing a string with 
+an object.
+
+To reproduce this issue, compile the following code snippet:
+
+using System;
+
+class X {
+       static void Main() {
+               object a = "11";
+               Console.WriteLine("11" == a);
+               Console.WriteLine(a == "11");
+       }
+}
+
+Expected result:
+
+test.cs(6,21): warning CS0253: Possible unintended reference comparison; 
+to get a value comparison, cast the right hand side to type 'string'
+test.cs(7,21): warning CS0252: Possible unintended reference comparison; 
+to get a value comparison, cast the left hand side to type 'string'
+
+Actual result:
+
+No warnings.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to