[Mono-bugs] [Bug 33180][Wis] New - Problem accesing to an enum inside a class

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
2 Nov 2002 14:43:16 -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 carlosga@telefonica.net.

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

--- shadow/33180	Sat Nov  2 09:43:16 2002
+++ shadow/33180.tmp.29680	Sat Nov  2 09:43:16 2002
@@ -0,0 +1,82 @@
+Bug#: 33180
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: carlosga@telefonica.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Problem accesing to an enum inside a class
+
+Hello:
+
+i´m trying to build a little programa with mcs and csc under windows
+the example have a class with an enum called Type
+there are a example program that try to acces to the enum through a
+instance of the class when i compile this with csc gives an error Type will
+be accesed through the class but with mcs the build finish good there can
+be a mcs compiler error??
+
+
+Test.cs
+
+using System;
+
+namespace Test
+{
+	class Test 
+	{
+		private static  TestClass testClass;
+
+		public static void Main() 
+		{
+			testClass = new TestClass();
+
+                        // This gives error compiling with csc but
+                        // but not with mcs
+			testClass.SetType(testClass.Type.FromUser);
+		}
+	}
+}
+
+TestClass.cs
+
+using System;
+
+namespace Test
+{  
+	public class TestClass
+	{
+		public static string test;
+
+		//constantes y cosas útiles	  
+		public enum Type {FromUser,FromServer,none};
+
+		private Type type;
+
+		public TestClass()
+		{
+		}
+
+		public void SetType(Type type)
+		{
+			this.type = type;
+		}
+	}
+}
+
+
+
+Best regards
+Carlos Guzmán Álvarez
+Vigo-Spain
+
+P.D.: Sorry for sending this two times.