Bugzilla – Bug 319765
[/doc] CS0419 is reported for cref to method on interface that hides inherited member
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by gert.driesen@pandora.be 2005-12-09 02:49:27 MST ---- 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. ---- Additional Comments From atsushi@ximian.com 2005-12-09 06:50:21 MST ---- Uhoh, it is very good catch. Now fixed in svn (r54154). Thanks. Unknown operating system unknown. Setting to default OS "Other".