Bug 319521 (MONO76692) - [/doc] CS1574 reported for reference to protected method with arguments
Summary: [/doc] CS1574 reported for reference to protected method with arguments
Status: RESOLVED FIXED
Alias: MONO76692
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other All
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Atsushi Enomoto
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-13 17:42 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:37:52 UTC


---- Reported by gert.driesen@pandora.be 2005-11-13 10:42:14 MST ----

When referring to a protected method with arguments using a <see 
cref="..." /> element, mcs always reports warning CS1574.

To reproduce this issue, compile the following code snippet (using 
mcs /doc:test.xml test.cs):

/// <summary>
/// <see cref="Create" />
/// <see cref="Define" />
/// <see cref="Undefine" />
/// <see cref="Remove" />
/// <see cref="Destroy" />
/// </summary>
public class EntryPoint {
	static void Main () {
	}

	protected void Create (bool test) {
		Define (true);
	}

	private void Define (bool test) {
	}

	protected void Undefine (bool test) {
	}

	protected void Remove () {
	}

	public virtual void Destroy (bool test) {
	}
}

Actual result:

test.cs(8,14): warning CS1574: XML Comment on 'EntryPoint' has cref 
attribute 'Create' that could not be resolved
test.cs(8,14): warning CS1574: XML Comment on 'EntryPoint' has cref 
attribute 'Undefine' that could not be resolved

Note that no warning is report for:
- Define: this method has arguments, but is private
- Remove: this method has no arguments
- Destroy: this method has arguments, but is public

Expected result:

No warnings.



---- Additional Comments From atsushi@ximian.com 2005-11-13 11:47:20 MST ----

This is not actually /doc bug. With -warn:4 option, mcs reports the
expected warnings fine.

The behavioral difference comes from the default warning level
difference between mcs and csc. mcs defaults the warning level to 3,
but csc seems to have something like "default". In the default state,
csc still reports those warnings, but currently we have no way to do
it inside mcs.




---- Additional Comments From gert.driesen@pandora.be 2005-11-13 12:51:05 MST ----

Hmm, I think you misunderstood the note I added to the "Actual 
results" section. 

None of the warnings mentioned in that section should be reported. 
The note just lists the cases where mcs is working OK (that might 
have caused the confusion). It only fails when the referenced method 
is protected AND has arguments.

The bug report is about the two warnings that are being reported.



---- Additional Comments From gert.driesen@pandora.be 2005-11-15 16:03:45 MST ----

Atsushi, can you comment on my last remark ?

Thanks !



---- Additional Comments From atsushi@ximian.com 2005-11-15 16:29:58 MST ----

Oops, yes, it is absolutely different matter. Will look at the bug.



---- Additional Comments From atsushi@ximian.com 2005-11-15 17:49:33 MST ----

Fixed in svn (r53090).



---- Additional Comments From gert.driesen@pandora.be 2005-11-30 06:02:00 MST ----

Atsushi, any idea when this change will be synced to gmcs ?



---- Additional Comments From atsushi@ximian.com 2005-11-30 10:16:56 MST ----

Ask Harinath for everything about gmcs merge.