[Mono-bugs] [Bug 67130][Wis] New - Inherited interface member not recognized
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 29 Sep 2004 13:10:19 -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 karl@waclawek.net.
http://bugzilla.ximian.com/show_bug.cgi?id=67130
--- shadow/67130 2004-09-29 13:10:19.000000000 -0400
+++ shadow/67130.tmp.12683 2004-09-29 13:10:19.000000000 -0400
@@ -0,0 +1,91 @@
+Bug#: 67130
+Product: Mono: Compilers
+Version: unspecified
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: karl@waclawek.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Inherited interface member not recognized
+
+Description of Problem:
+
+ Compiling the file below gives a compiler error on Mono 1.01,
+ but not on MS .NET 1.1.
+
+--- begin of file myclass.cs ---
+
+using System.Resources;
+
+namespace test
+{
+
+ interface IIntf1
+ {
+ string GetType(int index);
+ }
+
+ interface IIntf2: IIntf1
+ {
+ bool IsDone();
+ }
+
+ class Impl: IIntf2
+ {
+ public string GetType(int index)
+ {
+ return "none";
+ }
+
+ public bool IsDone()
+ {
+ return true;
+ }
+ }
+
+ class myclass
+ {
+
+ public static void Main(string[] args)
+ {
+ IIntf1 intf = new Impl();
+ IIntf2 intf2 = intf as IIntf2;
+ if (intf2 != null) {
+ string str = intf2.GetType(0);
+ }
+ }
+ }
+}
+
+--- end of file ---
+
+
+Steps to reproduce the problem:
+
+ mcs myclass.cs
+
+Actual Results:
+
+ [kwaclaw@newdevelopment Test]$ mcs myclass.cs
+ myclass.cs(38) error CS1501: No overload for method `GetType' takes `1'
+arguments
+ myclass.cs(38) error CS8006: Could not find any applicable function for
+this argument list
+ Compilation failed: 2 error(s), 0 warnings
+
+Expected Results:
+
+ Successful compile.
+
+
+How often does this happen?
+
+ Always.