[Mono-bugs] [Bug 35302][Nor] New - nonstatic property

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
9 Dec 2002 15:05:31 -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 vi64pa@koti.soon.fi.

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

--- shadow/35302	Mon Dec  9 10:05:31 2002
+++ shadow/35302.tmp.2598	Mon Dec  9 10:05:31 2002
@@ -0,0 +1,68 @@
+Bug#: 35302
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vi64pa@koti.soon.fi               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: nonstatic property
+
+Description of Problem:
+
+mcs compiles following code without any problems but csc throws an error.
+There is a nonstatic property and it is invoked like static.
+
+------
+
+using System;
+
+namespace bugreport
+{
+	public class BugClass
+	{
+		private int a = 0;
+		public BugClass() {}
+		
+		public int Bugy {
+			get {
+				return a;
+			}
+		}
+		
+		public void test () 
+		{
+			Console.WriteLine (BugClass.Bugy);
+		}
+		
+
+		public static void Main ()
+	        {
+			BugClass s = new BugClass();
+			s.test ();
+		}
+	}
+}
+
+----
+
+Actual Results:
+
+Compiled succesfull.
+
+Expected Results:
+
+error: And object reference is required for nonstatic field, method, or
+property.
+
+How often does this happen? 
+
+allways