Bugzilla – Bug 321637
CS1587 compiler warning false positive
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by matt@use.net 2006-07-21 13:01:35 MST ---- Steps to reproduce the problem: 1. get latest NUnit CVS 2. compile with 'nant mono-2.0 release build' Actual Results: Lots of warnings like this: [csc] /home/matt/src/nunit20/src/NUnitFramework/framework/Assert.cs(30,1): warning CS1587: XML comment is not placed on a valid language element Expected Results: Looking at the code, there isn't an XML comment on or near that line. The closest ones all appear legitimate to me. Additional Information: The Assert.cs mentioned above is attached. ---- Additional Comments From matt@use.net 2006-07-21 13:02:37 MST ---- Created an attachment (id=170150) source file referenced in warning false positive ---- Additional Comments From atsushi@ximian.com 2006-07-25 00:53:44 MST ---- From ECMA 334 (3rd Edition) Annex E (nominal Page 479 in the spec PDF): <blockquote> E.1 Introduction Comments having a special form can be used to direct a tool to produce XML from those comments and the source code elements, which they precede. Such comments are single-line comments of the form /// … or delimited comments of the form /** … */. They must immediately precede a user-defined type (such as a class, delegate, or interface) or a member (such as a field, event, property, or method) that they annotate. Attribute sections are considered part of declarations, so documentation comments must precede attributes applied to a type or member. </blockquote> Thus this is a bug in NUnit. (Hint: ECMA 334 does not specify that /*** is *not* a delimiter for XML doc comments.) Imported an attachment (id=170150) Unknown operating system unknown. Setting to default OS "Other".