[Mono-bugs] [Bug 77029][Nor] New - in iterators in partial types move_next_method is (could be) null

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Dec 18 13:31:12 EST 2005


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

--- shadow/77029	2005-12-18 13:31:12.000000000 -0500
+++ shadow/77029.tmp.10071	2005-12-18 13:31:12.000000000 -0500
@@ -0,0 +1,62 @@
+Bug#: 77029
+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: in iterators in partial types move_next_method is (could be) null
+
+This code results in NullReferenceException.
+
+using System;
+using System.Collections;
+
+namespace System.Query
+{
+        public partial class Sequence
+        {
+                public static IEnumerable Concat (
+                        IEnumerable first,
+                        IEnumerable second)
+                {
+                        if (first == null || second == null)
+                                throw new ArgumentNullException ();
+
+                        foreach (T element in first)
+                                yield return element;
+                        foreach (T element in second)
+                                yield return element;
+                }
+        }
+}
+
+Actual Results:
+
+$ mcs no-movenext.cs
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x0007a> Mono.CSharp.Iterator:Define ()
+in <0x001d8> Mono.CSharp.TypeContainer:Define ()
+in <0x00079> Mono.CSharp.TypeContainer:Define ()
+in <0x002dd> Mono.CSharp.RootContext:DefineTypes ()
+in <0x009b5> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00041> Mono.CSharp.Driver:Main (System.String[] args)
+
+Expected Results:
+
+only CS5001 (entrypoint not found).
+
+How often does this happen? 
+
+consistently.


More information about the mono-bugs mailing list