[Mono-bugs] [Bug 35337][Min] New - Enum to Object conversion
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
9 Dec 2002 21:41:51 -0000
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 f_azi@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=35337
--- shadow/35337 Mon Dec 9 16:41:51 2002
+++ shadow/35337.tmp.30577 Mon Dec 9 16:41:51 2002
@@ -0,0 +1,38 @@
+Bug#: 35337
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: f_azi@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Enum to Object conversion
+
+Description of Problem:
+System.Enum is not properly converted to System.Object when working with
+the parameters/arguments to resolve the overloads.
+
+The problem can be reproduced using the following source code:
+namespace ns1
+{
+ public class TheClass
+ {
+ public int GetNumericValue (System.Enum val)
+ {
+ int n = System.Convert.ToInt32(val);
+ return n;
+ }
+ }
+}
+
+System.Enum is not used as System.Object, so the compiler does not finds
+a suitable System.Convert.ToInt32 with an Enum parameter and the
+compilation fails.