[Mono-bugs] [Bug 52527][Wis] New - cast

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 20:55:17 -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 xiaoming.lin@longshine.com.

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

--- shadow/52527	2003-12-23 20:55:17.000000000 -0500
+++ shadow/52527.tmp.10563	2003-12-23 20:55:17.000000000 -0500
@@ -0,0 +1,61 @@
+Bug#: 52527
+Product: Mono/Compilers
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: xiaoming.lin@longshine.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: cast
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. 
+class MyClass{
+        public enum FieldType {ftUnknown = 0, ftString}
+	public static void Main(){
+		System.Console.WriteLine( (FieldType) int.Parse("1") );
+        }
+}
+2. 
+mcs b.cs
+3. 
+Actual Results:
+
+syntax error, expecting AS IS CLOSE_BRACE OPEN_BRACKET CLOSE_BRACKET 
+OPEN_PARENS CLOSE_PARENS DOT COMMA COLON SEMICOLON PLUS MINUS ASSIGN OP_LT 
+OP_GT BITWISE_AND BITWISE_OR STAR PERCENT DIV CARRET INTERR OP_INC OP_DEC 
+OP_SHIFT_LEFT OP_SHIFT_RIGHT OP_LE OP_GE OP_EQ OP_NE OP_AND OP_OR 
+OP_MULT_ASSIGN OP_DIV_ASSIGN OP_MOD_ASSIGN OP_ADD_ASSIGN OP_SUB_ASSIGN 
+OP_SHIFT_LEFT_ASSIGN OP_SHIFT_RIGHT_ASSIGN OP_AND_ASSIGN OP_XOR_ASSIGN 
+OP_OR_ASSIGN OP_PTR
+b.cs(7) error CS1002: Expecting `;'
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+Compilation succeeded
+
+How often does this happen? 
+
+always
+
+Additional Information:
+1.the csc can compliate it successfully.
+2.change 
+		System.Console.WriteLine( (FieldType) int.Parse("1") );
+  to
+		System.Console.WriteLine( (FieldType) (int.Parse("1")) );
+  then mcs can compliate it successfully.