Skip to content

Commit

Permalink
[scaladoc] A warning is printed when usecase members have different n…
Browse files Browse the repository at this point in the history
…ames than the real member being commented. Review by odersky. Contributed by Pedro Furlanetto.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@22362 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
  • Loading branch information
dubochet committed Jun 18, 2010
1 parent afb7e67 commit 0b22588
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compiler/scala/tools/nsc/typechecker/Typers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3754,12 +3754,17 @@ trait Typers { self: Analyzer =>
docComments(sym) = comment
comment.defineVariables(sym)
val typer1 = newTyper(context.makeNewScope(tree, context.owner))
for (useCase <- comment.useCases)
for (useCase <- comment.useCases) {
typer1.silent(_.typedUseCase(useCase)) match {
case ex: TypeError =>
unit.warning(useCase.pos, ex.msg)
case _ =>
}
useCase.defined foreach { symbol =>
if (sym.name.toString != symbol.name.toString)
unit.warning(useCase.pos, "@usecase "+symbol.name+" does not match commented symbol: "+sym.name)
}
}
}
typed(defn, mode, pt)

Expand Down

0 comments on commit 0b22588

Please sign in to comment.