[Mono-bugs] [Bug 76954][Nor] New - [/doc] CS0419 is reported for cref to method on interface that hides inherited member

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Dec 9 02:49:29 EST 2005


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 at pandora.be.

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

--- shadow/76954	2005-12-09 02:49:28.000000000 -0500
+++ shadow/76954.tmp.3553	2005-12-09 02:49:28.000000000 -0500
@@ -0,0 +1,96 @@
+Bug#: 76954
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [/doc] CS0419 is reported for cref to method on interface that hides inherited member
+
+mcs reports CS0419 for a cref to a method on an interface that hides an 
+inherited member.
+
+To reproduce, compile the following code snippet (using mcs /doc:test.xml 
+test.cs):
+
+/// <summary>
+/// <see cref="IB.Execute ()" />
+/// <see cref="IB.Name" />
+/// <see cref="B.Execute ()" />
+/// <see cref="B.Name" />
+/// </summary>
+public class EntryPoint {
+  static void Main () {
+  }
+}
+
+/// <summary />
+public interface IA {
+  /// <summary />
+  string Name {
+    get;
+  }
+
+  /// <summary />
+  string Execute ();
+}
+
+/// <summary />
+public interface IB : IA {
+  /// <summary />
+  new int Name {
+    get;
+  }
+
+  /// <summary />
+  new int Execute ();
+}
+
+/// <summary />
+public class A {
+  /// <summary />
+  public string Name {
+    get { return null; }
+  }
+
+  /// <summary />
+  public string Execute () {
+    return null;
+  }
+}
+
+/// <summary />
+public class B : A {
+  /// <summary />
+  public new int Name {
+    get { return 0; }
+  }
+
+  /// <summary />
+  public new int Execute () {
+    return 0;
+  }
+}
+
+Note: the repro can be simplified, but I also wanted to show that crefs 
+to hiding methods on classes are working fine. Also crefs to hiding 
+properties on both classes and types are working fine too.
+
+Actual result:
+
+test.cs(7,14): warning CS0419: Ambiguous reference in cref 
+attribute 'IB.Execute'. Assuming 'IB.Execute()' but other overloads 
+including 'IA.Execute()' have also matched
+
+Expected result:
+
+Successful compilation without warnings.


More information about the mono-bugs mailing list