[Mono-bugs] [Bug 74528][Nor] Changed - NAnt fails to compile on Mono SVN

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 11 Apr 2005 03:18:31 -0400 (EDT)


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 gert.driesen@pandora.be.

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

--- shadow/74528	2005-04-09 15:18:17.000000000 -0400
+++ shadow/74528.tmp.6306	2005-04-11 03:18:31.000000000 -0400
@@ -74,6 +74,35 @@
             Init(null, 0, 0);
         }
 
 So far I've been unable to isolate this to a simple testcase.
 Someone else reported this bug to the NAnt people too. That bug is here:
 http://sourceforge.net/tracker/index.php?func=detail&aid=1179203&group_id=31650&atid=402868
+
+------- Additional Comments From gert.driesen@pandora.be  2005-04-11 03:18 -------
+Here's a simple repro:
+
+public class Location {
+	public static readonly Location UnknownLocation = new 
+Location();
+
+	private Location() {
+	}
+}
+
+public abstract class Element {
+	private Location _location = Location.UnknownLocation;
+
+	protected virtual Location Location {
+		get { return _location; }
+		set { _location = value; }
+	}
+}
+
+Compiling this (using mcs /target:library test.cs) results in the 
+following error using mcs svn:
+
+test.cs(9) error CS1540: Cannot access protected member 
+`Element.Location' via a qualifier of type `object'; the qualifier 
+must be of type `Element' (or derived from it)
+
+The same code compiles fine using csc.