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=78324

--- shadow/78324        2006-05-07 12:19:17.000000000 -0400
+++ shadow/78324.tmp.5585       2006-05-07 12:19:17.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 78324
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] gmcs generates wrong code for comparing nullable types
+
+Currently, gmcs creates code which calls the op_Equality and op_Inequality
+operators defined in the Nullable class, however, these methods no longer
+exist in in net 2.0 RTM, so gmcs compiled programs which use these methods
+can't be run on the MS runtime. Instead of these methods, it should generate
+code to call the HasValue (when comparing to null), or the
+GetValueOfDefault methods.
+
+Testcase:
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+
+class M {
+  static void f (int? x, int? y) {
+      bool isnull = x == null;  
+         bool eq = x == y;
+  }
+
+   static void Main () {
+     f (1, 1);  
+     f (null, null); 
+   } 
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to