[Mono-bugs] [Bug 76136][Nor] Changed - [GMCS] Getting a generic struct via reflection fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 15 09:23:44 EST 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 vargaz at gmail.com.

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

--- shadow/76136	2005-09-26 07:41:15.000000000 -0400
+++ shadow/76136.tmp.6614	2005-11-15 09:23:44.000000000 -0500
@@ -63,6 +63,28 @@
 1
 
 How often does this happen? 
 always
 
 Additional Information:
+
+------- Additional Comments From vargaz at gmail.com  2005-11-15 09:23 -------
+For the record:
+
+This is caused by the fact that mono_type_get_underlying_type () returns
+a MonoType for GENERICINST types whose data.klass field points to
+the 'generic' generic class, not the 'specific' generic class created
+by mono_class_create_generic (). So either
+mono_type_get_underlying_type () needs to return the 'specific'
+generic class (and the byval_arg
+field of this class needs to point to itself and not to the generic
+class), or the code calling get_underlying_type () needs to call
+mono_class_from_mono_type () instead of accessing type->data.klass
+directly. There are lots of places inside the runtime where this
+bug manifests itself. For example, 
+
+http://bugzilla.ximian.com/show_bug.cgi?id=75479
+
+is caused by the same problem.
+
+
+


More information about the mono-bugs mailing list