Bug 319765 (MONO76954) - [/doc] CS0419 is reported for cref to method on interface that hides inherited member
Summary: [/doc] CS0419 is reported for cref to method on interface that hides inherite...
Status: RESOLVED FIXED
Alias: MONO76954
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Atsushi Enomoto
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-09 09:49 UTC by Gert Driesen
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:40:49 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".