[Mono-bugs] [Bug 81283][Min] New - gmcs crashes with exception with missing file (generics)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Apr 1 12:56:32 EDT 2007

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 ijbema at fmf.nl.


--- shadow/81283	2007-04-01 12:56:32.000000000 -0400
+++ shadow/81283.tmp.19084	2007-04-01 12:56:32.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 81283
+Product: Mono: Compilers
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: ijbema at fmf.nl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: gmcs crashes with exception with missing file (generics)
+When a file is not included in the gmcs commandline and it is referenced
+only as generic parameter somewhere, gmcs crashes with an exception.
+The following program:
+using System;
+using System.Collections.Generic;
+public class Bla {
+        public static void Main() {
+        }
+public class Foo {
+        public override IEnumerable<X> getXs(){
+                yield break;
+        }
+Gives the following error:
+Bla.cs(10,37): error CS0246: The type or namespace name `X' could not be
+found. Are you missing a using directive or an assembly reference?
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+  at Mono.CSharp.Iterator.CheckType (System.Type ret, System.Type&
+original_iterator_type, System.Boolean& is_enumerable) [0x00000] 
+  at Mono.CSharp.Iterator.CreateIterator (IMethodData method,
+Mono.CSharp.DeclSpace parent, Mono.CSharp.GenericMethod generic, Int32
+modifiers) [0x00000] 
+  at Mono.CSharp.MethodOrOperator.ResolveMembers () [0x00000] 
+  at Mono.CSharp.TypeContainer.DoResolveMembers () [0x00000] 
+  at Mono.CSharp.TypeContainer.ResolveMembers () [0x00000] 
+  at Mono.CSharp.TypeContainer.DefineType () [0x00000] 
+  at Mono.CSharp.Class.DefineType () [0x00000] 
+  at Mono.CSharp.RootContext.ResolveTree () [0x00000] 
+  at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000] 
+  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]

More information about the mono-bugs mailing list