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=81283 --- 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: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Minor +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +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] _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
