Bug 318307 (MONO75312) - [GMCS] gmcs cannot compile access to static generic field
Summary: [GMCS] gmcs cannot compile access to static generic field
Status: RESOLVED MOVED
Alias: MONO75312
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 22:50 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:49 UTC


---- Reported by nazgul@omega.pl 2005-06-18 15:50:29 MST ----

Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:
Gmcs refuses to compile accessing static field of nested generic class.

Steps to reproduce the problem:
1. Copile with gmcs t.cs /r:tlib.dll

public class A <T> {
  public class Nil : A <T> {
     public static Nil _N_constant_object = new Nil ();
  }
}

2. Try to compile gmcs t.cs /r:tlib2.dll

class M {
  static void Main () {
    A <int> x = A<int>.Nil._N_constant_object; 
  }
}

3. 

Actual Results:
t.cs(3) error CS0029: Cannot convert implicitly from `A`1.Nil[[T]]' to
`A`1[[System.Int32, mscorlib, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]]'
Compilation failed: 1 error(s), 0 warnings


Expected Results:
Compilation succeded

How often does this happen? 
Always

Additional Information:



---- Additional Comments From martin@ximian.com 2005-06-21 06:12:40 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"