diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-05-28 11:56:52 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-05-28 11:56:52 +0200 |
commit | b0a511f579013357aed47a4e51287175214da29a (patch) | |
tree | 7f27b876e3fb9a263cf61cc1e4c68c3d71ff2cfa /src | |
parent | 528f580c38aba0d4c1ea87ad9dde20bc0c24867b (diff) | |
parent | 23a3ac4ee21499a4d2fbffb5cecff88c7e03790c (diff) | |
download | scala-b0a511f579013357aed47a4e51287175214da29a.tar.gz scala-b0a511f579013357aed47a4e51287175214da29a.tar.bz2 scala-b0a511f579013357aed47a4e51287175214da29a.zip |
Merge pull request #4531 from kzys/8210-inherited-doc-211
SI-8210 Scaladoc: Fix the false negative @inheritdoc warning on accessors
Diffstat (limited to 'src')
-rwxr-xr-x | src/compiler/scala/tools/nsc/ast/DocComments.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/DocComments.scala b/src/compiler/scala/tools/nsc/ast/DocComments.scala index 02a199f7ac..6442ef2d54 100755 --- a/src/compiler/scala/tools/nsc/ast/DocComments.scala +++ b/src/compiler/scala/tools/nsc/ast/DocComments.scala @@ -76,9 +76,9 @@ trait DocComments { self: Global => superComment(sym) match { case None => - if (ownComment.indexOf("@inheritdoc") != -1) - reporter.warning(sym.pos, "The comment for " + sym + - " contains @inheritdoc, but no parent comment is available to inherit from.") + // SI-8210 - The warning would be false negative when this symbol is a setter + if (ownComment.indexOf("@inheritdoc") != -1 && ! sym.isSetter) + reporter.warning(sym.pos, s"The comment for ${sym} contains @inheritdoc, but no parent comment is available to inherit from.") ownComment.replaceAllLiterally("@inheritdoc", "<invalid inheritdoc annotation>") case Some(sc) => if (ownComment == "") sc |