[Mono-bugs] [Bug 69082][Nor] Changed - Regression in compiler.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 5 Nov 2004 16:10:12 -0500 (EST)
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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=69082
--- shadow/69082 2004-11-04 00:46:07.000000000 -0500
+++ shadow/69082.tmp.22381 2004-11-05 16:10:12.000000000 -0500
@@ -281,6 +281,49 @@
this.is_interface = type.IsInterface;
- this.member_cache = new MemberCache (this);
+ this.member_cache = new MemberCache (this, true);
}
// IMemberContainer methods
+
+------- Additional Comments From miguel@ximian.com 2004-11-05 16:10 -------
+Am looking at a similar regression that is introduced when I tried
+to fix #64400.
+
+Both of these bugs have something similar: they both are getting
+visibility into properties they should not be having access too.
+
+In the case of test-135 with my fix applied, what happens is the
+following:
+
+In the following case:
+
+interface I {
+ object this [int index] { get; }
+}
+
+class X : I {
+ object I.this [int index] { get { return null; }}
+ object this [int index] () { return null;}
+}
+
+class D {
+static void Main ()
+{
+ X x = new X ();
+ object x = x [0]; <- Error.
+}
+}
+
+The error happens because it tries to choose between X::I.this and
+X::this from the class X.
+
+When doing overload resolution we are overload resolving on
+both `this[int index]' and `I.this[int index]'.
+
+We should not have any visibility into I.this[int indext] at all.
+
+Notice that if we replace the properties above with methods,
+the compiler effectively ignores the implicit implementation
+member as it should.
+
+