Bug 325048 (MONO82381) - [DOC] Cannot put xml documentation on indexers in interfaces.
Summary: [DOC] Cannot put xml documentation on indexers in interfaces.
Status: RESOLVED FIXED
Alias: MONO82381
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.2
Hardware: Other Linux
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Marek Safar
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-08 23:13 UTC by fizzfaldt
Modified: 2011-03-23 17:41 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 20:47:49 UTC


---- Reported by fizzfaldt@gmail.com 2007-08-08 16:13:29 MST ----

Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:
When using /docs:
XML Documentation of indexers inside of interfaces is not permitted.
For a public interface, documentation is required for the indexer,
but putting it there gives a false CS1587 warning.
Exists in gmcs and mcs (version 1.2.4.0)

Steps to reproduce the problem:
1. use gmcs -doc:foo.xml xmlerror.cs

Actual Results:
xmlerror.cs(25,9): warning CS1587: XML comment is not placed on a valid
language element

Expected Results:
Successful compilation, xml documentation should be generated.


How often does this happen? 
Always


Additional Information:
I do not know how the microsoft compiler handles this.

Contents of xmlerror.cs:
Additional code is here to show that similar things do not cause problems.

<code>
///<summary>summary</summary>
public class blah
{
	///<summary>summary</summary>
	public static int Main(string[] args)
	{
		return 0;
	}
}

///<summary>summary</summary>
public interface Interface
{
	//Having the following summary will give warning CS1587.
	//Expected: Adds happily to XML documentation.
	
	//Not having it will give warning CS1591.
	//Expected: Exactly that.
	

	///<summary>Problem!</summary>
	int this[int index]
	{
		get;
	}
}

</code>



---- Additional Comments From fizzfaldt@gmail.com 2007-08-18 02:56:17 MST ----

VS 2005 C# compiler compiles without warnings and generates:
D:\Win32\Microsoft Visual Studio 8\VC>type foo.xml
<?xml version="1.0"?>
<doc>
<assembly>
<name>code</name>
</assembly>
<members>
<member name="T:blah">
<summary>summary</summary>
</member>
<member name="M:blah.Main(System.String[])">
<summary>summary</summary>
</member>
<member name="T:Interface">
<summary>summary</summary>
</member>
<member name="P:Interface.Item(System.Int32)">
<summary>Problem!</summary>
</member>
</members>
</doc>


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Redhat Enterprise 4 (uname -a reports Linux pacifico 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 12 17:58:20 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux)</cf_op_sys_details>
Unknown bug field "cf_version_details" encountered while moving bug
   <cf_version_details>gmcs and mcs version 1.2.4.0 (from linux binary installer)</cf_version_details>

Comment 2 Marek Safar 2011-03-23 17:41:58 UTC
Fixed in master