[Mono-bugs] [Bug 57013][Nor] Changed - mcs emits invalid il code for arrays with enum values
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 14 Apr 2004 21:38:31 -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=57013
--- shadow/57013 2004-04-14 20:02:15.000000000 -0400
+++ shadow/57013.tmp.19434 2004-04-14 21:38:31.000000000 -0400
@@ -41,6 +41,17 @@
Created an attachment (id=7366)
patch
------- Additional Comments From ravi@ximian.com 2004-04-14 20:02 -------
The patch looks correct to me but I will let Miguel comment on this.
+
+------- Additional Comments From bmaurer@users.sf.net 2004-04-14 21:38 -------
+First, you need to use the TypeManager methods:
+EnumToUnderlying
+
+This isnt a contest for the biggest patch :-)
+
+You can just add this to the top of the function:
+type = EnumToUnderlying (type);
+
+(note, that it is an identity function if the type is not an enum).