[Mono-bugs] [Bug 30040][Wis] New - Arrays of enum types are not correctly initialized

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
9 Sep 2002 04:57:37 -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 mathpup@mylinuxisp.com.

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

--- shadow/30040	Mon Sep  9 00:57:37 2002
+++ shadow/30040.tmp.21010	Mon Sep  9 00:57:37 2002
@@ -0,0 +1,61 @@
+Bug#: 30040
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathpup@mylinuxisp.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Arrays of enum types are not correctly initialized
+
+Description of Problem:    
+    
+Arrays of enum types are not correctly initialized. Every element of the    
+array is set to the same value as the first element.    
+    
+Steps to reproduce the problem:    
+1. Run the program below.    
+    
+using System;   
+   
+public class Testing   
+{   
+	enum Fruit { Apple, Banana, Cherry };   
+   
+	public static void Main()   
+	{   
+		Fruit[] pieFillings = { Fruit.Apple, Fruit.Banana,   
+Fruit.Cherry };   
+		   
+		foreach ( Fruit f in pieFillings )   
+			Console.WriteLine("{0} pies", f);   
+	}	   
+}   
+   
+    
+    
+Actual Results:    
+  
+Apple pies  
+Apple pies  
+Apple pies    
+    
+Expected Results: 
+  
+Apple pies 
+Banana pies 
+Cherry pies 
+    
+How often does this happen?     
+ 
+Always 
+    
+Additional Information: