Bugzilla – Bug 317719
CS0419 wrongly reported for event cref
Last modified: 2007-09-15 21:24:23 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.