[Mono-bugs] [Bug 75313][Wis] New - [GMCS] gmcs crashes on typeof expression for external generic type

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jun 18 16:46:10 EDT 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 nazgul at omega.pl.

http://bugzilla.ximian.com/show_bug.cgi?id=75313

--- shadow/75313	2005-06-18 16:46:10.000000000 -0400
+++ shadow/75313.tmp.29888	2005-06-18 16:46:10.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 75313
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: mono svn 17.06.2005
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: nazgul at omega.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] gmcs crashes on typeof expression for external generic type
+
+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:


More information about the mono-bugs mailing list