Bugzilla – Bug 318308
[GMCS] gmcs crashes on typeof expression for external generic type
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by nazgul@omega.pl 2005-06-18 16:46:09 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: gmcs crasches on typeof (A<int>.Nil) expression for external A Steps to reproduce the problem: 1. Compile gmcs tlib.cs /t:library /out:tlib.dll public class A <T> { public class Nil : A <T> { public static Nil _N_constant_object = new Nil (); } public static A<int>.Nil constant_object; } 2. Try to compile gmcs t.cs /r:tlib.dll class M { static void Main () { System.Reflection.FieldInfo t = typeof (A<int>.Nil).GetField ("constant_object"); } } Actual Results: Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range. in <0x00050> Mono.CSharp.Expression:MemberLookup (Mono.CSharp.EmitContext ec, System.Type container_type, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) in <0x0004b> Mono.CSharp.Expression:MemberLookup (Mono.CSharp.EmitContext ec, System.Type qualifier_type, System.Type queried_type, System.String name, Location loc) Expected Results: Clean compilation How often does this happen? Always Additional Information: ---- Additional Comments From martin@ximian.com 2005-06-21 06:13:54 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO75320 *** Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>mono svn 17.06.2005</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"