[Mono-bugs] [Bug 74684][Wis] Changed - [GMCS] Unable to define generic field inside generic type through S.R.E

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 4 May 2005 10:32:08 -0400 (EDT)


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@omega.pl.

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

--- shadow/74684	2005-05-04 10:26:31.000000000 -0400
+++ shadow/74684.tmp.14483	2005-05-04 10:32:08.000000000 -0400
@@ -1,23 +1,23 @@
 Bug#: 74684
-Product: Mono: Class Libraries
+Product: Mono: Runtime
 Version: 1.0
-OS: 
+OS: unknown
 OS Details: mono svn from 20 Apr 2005
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
-Component: CORLIB
+Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: nazgul@omega.pl               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Unable to define generic field inside generic type through S.R.E
+Summary: [GMCS] Unable to define generic field inside generic type through S.R.E
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 There is an assertion in runtime when I try to generate code similar to
 class A <T> {
@@ -82,6 +82,19 @@
 which is their bug and I guess it's fixed in Beta2)
 
 ------- Additional Comments From nazgul@omega.pl  2005-05-04 10:26 -------
 Created an attachment (id=15064)
 This patch reliefs the assumption in rutime, which IMHO is not neccessary
 
+
+------- Additional Comments From nazgul@omega.pl  2005-05-04 10:32 -------
+I've attached the patch, which is moving the assertion that generic
+type is closed only to the case of value type. Otherwise, the size of
+field containing it is just a pointer size and it does not depend on
+the closedness of generic type.
+
+For value types the assertion seems to be feasible, since
+struct A <T> {
+  A<T> f;
+}
+
+is always invalid, also for static fields.