[Mono-bugs] [Bug 80591][Nor] New - Incorrect conversion between enums
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jan 23 17:47:04 EST 2007
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 at omega.pl.
http://bugzilla.ximian.com/show_bug.cgi?id=80591
--- shadow/80591 2007-01-23 17:47:04.000000000 -0500
+++ shadow/80591.tmp.2365 2007-01-23 17:47:04.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 80591
+Product: Mono: Runtime
+Version: 1.2
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com
+ReportedBy: nazgul at omega.pl
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Incorrect conversion between enums
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Cast from enum based on ushort to enum based on uint does not give correct
+value
+
+Steps to reproduce the problem:
+1. Compile and run program
+
+enum FromUint : uint {
+ A,
+ B,
+ Ma = uint.MaxValue
+}
+
+enum FromUShort : ushort {
+ AA,
+ BB = 2334
+}
+
+class Bases {
+ public static void Main () {
+ FromUShort y = (FromUShort) 1;
+ System.Console.WriteLine (y);
+ FromUint z = (FromUint) y ;
+ System.Console.WriteLine (z);
+ }
+}
+
+
+Actual Results:
+1
+1369702401
+
+(actually the second number seems random)
+
+Expected Results:
+1
+B
+
+How often does this happen?
+Always
+
+Additional Information:
+tested with mono svn and mono 1.2.2
More information about the mono-bugs
mailing list