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 vargaz (AT) gmail (DOT) com.
shadow/783242006-05-07 12:19:17.000000000 -0400
shadow/78324.tmp.55852006-05-07 12:19:17.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 78324
+Product: Mono: Compilers
+Version: unspecified
+S:
+S Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath (AT) novell (DOT) com
+ReportedBy: vargaz (AT) gmail (DOT) com
+QAContact: mono-bugs (AT) ximian (DOT) com
+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
+GetVDefault 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 - mono-bugs (AT) lists (DOT) ximian.com