[Mono-bugs] [Bug 75692][Nor] New - [GMCS] gmcs is confused by nested / inherited generic classes

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 2 13:43:44 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=75692

--- shadow/75692	2005-08-02 13:43:44.000000000 -0400
+++ shadow/75692.tmp.18678	2005-08-02 13:43:44.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 75692
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: mono svn
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+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 is confused by nested / inherited generic classes
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I tried to compile example from
+http://blogs.msdn.com/cyrusn/archive/2005/08/01/446431.aspx
+but gmcs refuses to understand it
+
+Steps to reproduce the problem:
+1. Try to compile
+
+public class A<T1>
+{
+ public T1 a;
+
+ public class B<T2> : A<T2>
+ {
+ public T1 b;
+
+ public class C<T3> : B<T3>
+ {
+ public T1 c;
+ }
+ }
+}
+class PopQuiz
+{
+ static void Main()
+ {
+ A<int>.B<char>.C<bool> o = new A<int>.B<char>.C<bool>();
+ System.Console.WriteLine(o.a.GetType().FullName);
+ System.Console.WriteLine(o.b.GetType().FullName);
+ System.Console.WriteLine(o.c.GetType().FullName);
+ }
+}
+
+
+Actual Results:
+monobug-nested-inherit-gen.cs(10) error CS0305: Using the generic type
+`A<T1>.B<T1,T2>' requires 2 type arguments
+
+
+Expected Results:
+Clean compile
+
+How often does this happen? 
+Always
+
+Additional Information:
+in runtime it should give
+System.Bool
+System.Char
+System.Int32


More information about the mono-bugs mailing list