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

--- shadow/79239        2006-08-31 17:58:07.000000000 -0400
+++ shadow/79239.tmp.7138       2006-08-31 17:58:07.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 79239
+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 throws a nullref on 'class Outer : IEnumerator<Outer.Inner>'
+
+gmcs will crash with a NullReferenceException if it encounters a class
+definition like this:
+
+public class Outer : IEnumerable<Outer.Inner>
+{
+    public class Inner 
+    { ... }
+
+    ...
+}
+
+Changing IEnumerable<Outer.Inner> to just IEnumerable (even with both the
+generic and non-generic GetEnumerator implementations present) causes the
+code to build and run as expected (minus the obvious generic restriction).
+
+Here's the crash:
+
[EMAIL PROTECTED]:~$ gmcs enumerate-nested-class.cs 
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+  at Mono.CSharp.TypeContainer.DoDefineMembers () [0x00000] 
+  at Mono.CSharp.Class.DoDefineMembers () [0x00000] 
+  at Mono.CSharp.TypeContainer.DefineMembers () [0x00000] 
+  at Mono.CSharp.RootContext.PopulateTypes () [0x00000] 
+  at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000] 
+  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
+
+Tested on gmcs 1.1.13.8 (SLED) and 1.1.16.1 (Ubuntu Edgy) with the same
+result. I don't have 1.1.17 or HEAD installed anymore at the moment to test
+there.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to