[Mono-bugs] [Bug 78019][Nor] New - [GMCS] nullable null constant is not stored as null.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Apr 5 02:24:29 EDT 2006


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

--- shadow/78019	2006-04-05 02:24:29.000000000 -0400
+++ shadow/78019.tmp.1331	2006-04-05 02:24:29.000000000 -0400
@@ -0,0 +1,58 @@
+Bug#: 78019
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] nullable null constant is not stored as null.
+
+Probably gmcs fails to store Nullable constant as correct null but somewhat
+broken null.
+
+public class Test
+{
+        public static void Main ()
+        {
+                Foo<int?> (v);
+        }
+
+        static void Foo<T> (T n)
+        {
+                if (n == null)
+                        return;
+                else
+                        throw new System.Exception ();
+        }
+
+        static int? v;
+}
+
+
+Actual Results:
+
+Unhandled Exception: System.Exception: Exception of type System.Exception
+was thrown.
+in <0x00020> Test:Foo[Nullable`1] (Nullable`1 n)
+in <0x0001b> Test:Main ()
+
+Expected Results:
+
+no error.
+
+How often does this happen? 
+
+consistently.
+
+Additional Information:
+
+If I compile it with csc, it works fine on mono.


More information about the mono-bugs mailing list