[Mono-dev] [Patch] gmcs considers bla<T> and bla{T} as illegal in a cref

Andreas Färber andreas.faerber at web.de
Sun May 17 16:25:48 EDT 2009

Am 17.05.2009 um 21:16 schrieb Eberhard Beilharz:

> Andreas Färber wrote:
>> Am 16.05.2009 um 22:33 schrieb Eberhard Beilharz:
>>> gmcs gives warning CS1584 if you have an XML comment referencing a
>>> generic type like cref="Bla<T>" or cref="Bla{T}". Those two variants
>>> work with Microsoft's csc. The only variant that makes gmcs happy is
>>> cref="T:Bla`1" which gives a warning with Microsoft's csc (it used  
>>> to be
>>> the way to do it with older versions of csc).
>> cref="Bla<T>" is invalid XML and shouldn't be encouraged imo.
>> To be valid, that would need to be written as cref="Bla&lt;T&gt;".  
>> How does csc handle that variant?
> Of course you're right. You have to write cref="Bla&lt;T&gt;" in the  
> XML comment; cref="Bla<T>" (correctly) gives an error in both csc  
> and gmcs.
> In doc.cs however "&lt;" and "&gt;" are already parsed to '<' resp.  
> '>' that's why I confused it in my example.

Thanks for clarifying. No objections then. :)


> See <http://msdn.microsoft.com/en-us/library/2d6dt3kf.aspx> for an  
> example of all three valid variants.
>> The cref="Bla{T}" part of the patch looks okay and would seem to  
>> fix the reported bug already, no?
> While that is true the cref="Bla&lt;T&gt;" is also a problem which  
> is hitting me at the moment so I'd prefer to have both versions  
> fixed at once rather than filing another bug report...
>> Andreas
>>> Would someone please review and commit my patch attached to bug  
>>> #480862
>>> (<https://bugzilla.novell.com/show_bug.cgi?id=480862>) which treats
>>> Bla<T> and Bla{T} as being equal to T:Bla`1 in a cref.
>>> Thanks,
>>>   Eberhard Beilharz
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list