[Mono-bugs] [Bug 56013][Wis] Changed - [PATCH] Compiler ignores property accessor names in the metadata

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 15 Apr 2004 00:19:02 -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 bmaurer@users.sf.net.

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

--- shadow/56013	2004-03-30 19:55:05.000000000 -0500
+++ shadow/56013.tmp.20830	2004-04-15 00:19:01.000000000 -0400
@@ -44,6 +44,53 @@
 ------- Additional Comments From miguel@ximian.com  2004-03-30 11:40 -------
 Thanks for your patch Patrik, it is now on CVS.
 
 ------- Additional Comments From miguel@ximian.com  2004-03-30 19:55 -------
 Reopened the bug, the patch produced a regression on test-169.cs
 
+
+------- Additional Comments From bmaurer@users.sf.net  2004-04-15 00:19 -------
+So, basically, the problem is that there is no way to say `What is the
+base property of this property'. As such, we have 100% half-assed code
+to guess the answer to this question. Take a few tough examples:
+
+1) The one above, where the name is not get_xxx. We are not able to do
+a query on the methods.
+2)
+
+class A {
+   public virtual int Foo { get; set; }
+}
+
+class B : A {
+   public override int Foo { get; }
+   static void Main () {
+       new B ().Foo = 1;
+   }
+}
+
+The PropertyInfo for B does not contain the info on the set method, we
+have to look it up for the base class
+
+3)
+
+class A {
+   public virtual int Foo { get; set; }
+}
+
+class B : A {
+   private new int Foo { get; }
+}
+
+class C : B {
+   static void Main () {
+       new C ().Foo = 1;
+   }
+}
+
+The C Foo property can be set in this context. You have to make sure
+you are not tricked by the other one.
+
+In all of these cases, we have trouble getting the correct `get' and
+`set' method from the propertyinfo. We need a reliable method to do this.
+
+