[Mono-bugs] [Bug 75312][Wis] New - [GMCS] gmcs cannot compile access to static generic field

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jun 18 15:50:29 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=75312

--- shadow/75312	2005-06-18 15:50:29.000000000 -0400
+++ shadow/75312.tmp.29603	2005-06-18 15:50:29.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 75312
+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 cannot compile access to static generic field
+
+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:


More information about the mono-bugs mailing list