[Mono-devel-list] Patch for full-featured mcs /doc support

Ian MacLean ianm at ActiveState.com
Wed Dec 1 22:44:02 EST 2004


>
>
>>> There seems to be an issue with doc comments on Interface members. The
>>> following code :
>>    
>>
><snip>
>
>Oh, yes, I forgot to consume doc comments on most of interface
>member declarations except for indexers. Thanks!
>

Cool - I've found a couple more :) It seems the type validation on cref
items is too strict:

/// <summary>
/// some summary
/// </summary>
/// <value>
/// <see cref="System.Text.RegularExpressions"/>
/// </value>
public void foo2() {

}

/// <summary>
/// Writes out a formatted string using the same semantics as
/// <see cref="string.Format(string, object[])" />.
/// </summary>
/// <param name="line">The formatting string.</param>
/// <param name="args">The object array to write into format string.</param>
public void foo3(string line, params object[] args) {
}
}

gives:
ianm at linux:~/dev> mcs -doc:foo.xml test-doc.cs
fails-doc.cs(25) warning CS1574: XML comment on 'Class1.foo2()' has cref
attribute 'System.Text.RegularExpressions' that could not be resolved in
'Class1'.
fails-doc.cs(35) warning CS1580: Invalid type for parameter '2' in XML
comment cref attribute 'string.Format(string, object[])'
Compilation succeeded - 2 warning(s)

The same code gets no warnings with csc.exe

maybe I should wait till you get this all committed to svn and then
start logging these in bugzilla ?

Ian




More information about the Mono-devel-list mailing list