[Mono-bugs] [Bug 40970][Nor] Changed - FindMembers fails when there is a nameclash with explicit interfaces
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Wed, 9 Apr 2003 19:35:22 -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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=40970
--- shadow/40970 Tue Apr 8 19:23:01 2003
+++ shadow/40970.tmp.4417 Wed Apr 9 19:35:21 2003
@@ -1,23 +1,23 @@
Bug#: 40970
-Product: Mono/MCS
+Product: Mono/Runtime
Version: unspecified
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
-Component: Misc
+Component: misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: gonzalo@ximian.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: Error compiling a protected virtual method
+Summary: FindMembers fails when there is a nameclash with explicit interfaces
mcs fails compiling tabcontrol2.cs in xsp module.
The problem is that the signature generated for a protected virtual method
(System.Web.UI.Control::AddParsedSubObject) does not include the
'hidebysig' modifier.
@@ -33,6 +33,44 @@
Additional Information:
Mono.Controls.Tabs2 derives from System.Web.UI.UserControl, which derives
from TemplateControl, which derives from Control (which has that method as
protected virtual).
It used to compile.
+
+------- Additional Comments From miguel@ximian.com 2003-04-09 19:35 -------
+This seems to be a bug in our runtime/class libraries.
+
+When we load from an assembly a type who implements an interface, we
+do not get any visibility on methods with the same name as the methods
+from the interface.
+
+Try the following two files expose this bug.
+
+Compile like this:
+
+mcs -target:library a.cs
+mcs -r:a.dll b.cs
+
+And you will get:b.cs(2) error CS0115: `Y.A' no suitable methods found
+to override
+
+Type.FindMembers is not returning the method "A" for some reason.
+
+The above sample works with MCS on Windows.
+
+--- a.cs ---
+interface I { void A (); }
+
+public class X : I {
+ void I.A () {}
+
+ protected virtual void A () {}
+}
+------------
+
+--- b.cs ---
+class Y : X{
+ protected override void A () {}
+ static void Main () { }
+}
+------------