Bug 317719 (MONO74633) - CS0419 wrongly reported for event cref
Summary: CS0419 wrongly reported for event cref
Status: RESOLVED FIXED
Alias: MONO74633
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Linux
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Atsushi Enomoto
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-16 16:58 UTC by Gert Driesen
Modified: 2007-09-15 21:24 UTC (History)
1 user (show)

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:13:39 UTC


---- Reported by gert.driesen@pandora.be 2005-04-16 09:58:47 MST ----

A cref to an event caused CS0419 to be reported.

To reproduce, try compiling the following code snippet (using 
mcs /doc:test.xml test.cs):

using System;

/// <summary>
/// <see cref="AppDomain.AssemblyResolve" />
/// </summary>
public class Whatever {
  /// <summary>
  /// </summary>
  public static void Main() {
  }
}

Actual result:

test.cs(6) warning CS0419: Ambiguous member specification in cref 
attribute: 'AssemblyResolve'. Check overloaded members and supply exact 
parameters.
Compilation succeeded - 1 warning(s)

Expected result:

Successful compilation without warnings



---- Additional Comments From atsushi@ximian.com 2005-04-16 19:26:04 MST ----

Does it really happen? It does not reproduce on my box. Can you please
try the latest svn?

Also note that csc never successfully compiled without warning. Here I
paste the output from csc:

$ mcs -doc:dummy.xml 74633.cs
74633.cs(4) warning CS1574: XML comment on 'Whatever' has cref
attribute 'AppDomain.AssemblyResolve' that could not be resolved in
'Whatever'.
Compilation succeeded - 1 warning(s)

$ csc -doc:dummy.xml 74633.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

74633.cs(2,16): warning CS1574: XML comment on 'Whatever' has cref
attribute 'AppDomain.AssemblyResolve' that could not be found




---- Additional Comments From gert.driesen@pandora.be 2005-04-17 04:14:57 MST ----

I just verified it again on Mono/Mcs svn, and I can still reproduce 
it. 

I do not get any warning using csc. Are you sure you also included 
the using directive in the source that you used ?



---- Additional Comments From atsushi@ximian.com 2005-04-17 09:04:29 MST ----

Ugh, yes it was, sorry about that. Now it is fixed in svn, by ignoring
duplicate member definitions between a field and an event.