Bug 318308 (MONO75313) - [GMCS] gmcs crashes on typeof expression for external generic type
Summary: [GMCS] gmcs crashes on typeof expression for external generic type
Status: RESOLVED MOVED
Alias: MONO75313
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.0
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-18 23:46 UTC by Kamil Skalski
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:21:50 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"