[Mono-bugs] [Bug 56245][Maj] Changed - System.Type.UnderlyingSystemType break between Mono 0.29 and .Net 1.1.4322.573
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 28 Aug 2004 00:23:26 -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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=56245
--- shadow/56245 2004-06-23 08:09:30.000000000 -0400
+++ shadow/56245.tmp.25078 2004-08-28 00:23:26.000000000 -0400
@@ -5,13 +5,13 @@
OS Details: Running off the shelf RH 9.0, updated with red carpet
Status: NEW
Resolution:
Severity: Unknown
Priority: Major
Component: misc
-AssignedTo: mono-bugs@ximian.com
+AssignedTo: bmaurer@users.sf.net
ReportedBy: jcornado@yahoo.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
Cc:
Summary: System.Type.UnderlyingSystemType break between Mono 0.29 and .Net 1.1.4322.573
@@ -45,6 +45,27 @@
------- Additional Comments From miguel@ximian.com 2004-05-12 21:10 -------
MCS uses UnderlyingSystemType to go from an Enum to its underlying
type, that is the only use that we have for it.
I think its odd that the sample above is behaving like
Type.GetElementType
+
+------- Additional Comments From bmaurer@users.sf.net 2004-08-28 00:23 -------
+static MonoReflectionType*
+ves_icall_MonoType_get_UnderlyingSystemType (MonoReflectionType *type)
+{
+ MonoDomain *domain = mono_domain_get ();
+ MonoClass *class = mono_class_from_mono_type (type->type);
+
+ MONO_ARCH_SAVE_REGS;
+
+ if (class->enumtype && class->enum_basetype) /* types that are
+modified typebuilders may not have enum_basetype set */
+ return mono_type_get_object (domain, class->enum_basetype);
+ else if (class->element_class)
+ return mono_type_get_object (domain, &class->element_class->byval_arg);
+ else
+ return NULL;
+}
+
+i think that the class->element_class part shouldnt be there. But I
+need to do more tests with MSFT.