[Mono-bugs] [Bug 52516][Nor] New - enum with base type byte can't be used with +

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 7 Jan 2004 01:38:32 -0500 (EST)

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 miguel@ximian.com.


--- shadow/52516	2004-01-07 01:38:32.000000000 -0500
+++ shadow/52516.tmp.32636	2004-01-07 01:38:32.000000000 -0500
@@ -0,0 +1,45 @@
+Bug#: 52516
+Product: Mono/Compilers
+Version: unspecified
+OS: All
+OS Details: 
+Status: RESOLVED   
+Resolution: FIXED
+Severity: Unknown
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: pcgod@gmx.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: enum with base type byte can't be used with +
+Description of Problem:
+Mcs doesn't allow you to add an int to an enum with base type byte. This 
+works with csc.
+Steps to reproduce the problem:
+1. Try to compile the testcase
+Actual Results:
+test.cs(16) error CS0019: Operator + cannot be applied to operands of type 
+`T+Test' and `int'
+test.cs(17) error CS0165: Use of unassigned local variable `y'
+Expected Results:
+Compile without error.
+How often does this happen? 
+------- Additional Comments From pcgod@gmx.net  2003-12-23 17:04 -------
+Created an attachment (id=6309)
+test case
+------- Additional Comments From miguel@ximian.com  2004-01-07 01:38 -------
+Thanks, this was a missing implicit conversion in the enum operator code.