[Mono-bugs] [Bug 40458][Wis] New - char not valid as enum type

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 28 Mar 2003 06:51:42 -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 joergr@voelcker.com.

http://bugzilla.ximian.com/show_bug.cgi?id=40458

--- shadow/40458	Fri Mar 28 06:51:41 2003
+++ shadow/40458.tmp.11006	Fri Mar 28 06:51:41 2003
@@ -0,0 +1,43 @@
+Bug#: 40458
+Product: Mono/MCS
+Version: unspecified
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: JoergR@voelcker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: char not valid as enum type
+
+Description of Problem:
+The Mono C# compiler does not accept char constants as enum member
+initializer. It's possible using Microsoft's CSC.
+
+
+Steps to reproduce the problem:
+public enum TestEnum
+{
+    MyA = 'A',
+    MyB = 'B',
+    MyC = 'C'
+}
+
+Actual Results:
+CharEnum.cs(7) error CS1008: Type byte, sbyte, short, ushort, int, uint,
+long, or ulong expected (have: CharLiteral ("A"))
+
+Expected Results:
+No errors.
+
+How often does this happen? 
+Always.
+
+Additional Information:
+Tested with Mono C# compiler version 0.23.0.0