@@ -79,7 +79,7 @@ class CommentExpander {
7979 case None =>
8080 // SI-8210 - The warning would be false negative when this symbol is a setter
8181 if (ownComment.indexOf(" @inheritdoc" ) != - 1 && ! sym.isSetter)
82- println (s " ${sym.span} : the comment for ${sym} contains @inheritdoc, but no parent comment is available to inherit from. " )
82+ report.warning (s " The comment for ${sym} contains @inheritdoc, but no parent comment is available to inherit from. " , sym.srcPos )
8383 ownComment.replace(" @inheritdoc" , " <invalid inheritdoc annotation>" )
8484 case Some (sc) =>
8585 if (ownComment == " " ) sc
@@ -159,7 +159,7 @@ class CommentExpander {
159159 * @param sym The child symbol
160160 * @return The child comment with the inheritdoc sections expanded
161161 */
162- def expandInheritdoc (parent : String , child : String , sym : Symbol ): String =
162+ def expandInheritdoc (parent : String , child : String , sym : Symbol )( using Context ) : String =
163163 if (child.indexOf(" @inheritdoc" ) == - 1 )
164164 child
165165 else {
@@ -193,8 +193,8 @@ class CommentExpander {
193193 val sectionTextBounds = extractSectionText(parent, section)
194194 cleanupSectionText(parent.substring(sectionTextBounds._1, sectionTextBounds._2))
195195 case None =>
196- println (s """ ${sym.span} : the """" + getSectionHeader + " \" annotation of the " + sym +
197- " comment contains @inheritdoc, but the corresponding section in the parent is not defined." )
196+ report.warning (s """ The """" + getSectionHeader + " \" annotation of the " + sym +
197+ " comment contains @inheritdoc, but the corresponding section in the parent is not defined." , sym.srcPos )
198198 " <invalid inheritdoc annotation>"
199199 }
200200
0 commit comments