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=78752 --- shadow/78752 2006-07-03 10:47:21.000000000 -0400 +++ shadow/78752.tmp.3568 2006-07-03 10:47:21.000000000 -0400 @@ -0,0 +1,56 @@ +Bug#: 78752 +Product: Mono: Compilers +Version: 1.1 +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] cast from object to nullable type causes NullReferenceException + +The following code when compiled with gmcs causes NullReferenceException, +while with csc it does not. + +-------- +using System; + +public class Tset +{ + public static void Main () + { + Foo (); + } + + static object obj; + + static bool? Foo () + { + return (bool?) obj; + } +} + + +Actual Results: + +mono ./nullable-cast.exe + +Unhandled Exception: System.NullReferenceException: Object reference not set to +an instance of an object + at Tset.Foo () [0x00000] + at Tset.Main () [0x00000] + +Expected Results: + +no error. + +How often does this happen? + +consistently. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
