diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-03-13 12:09:23 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-03-13 12:09:23 +0100 |
commit | f46ae47fb93867e8d11c80498b5dd2b6c2274b23 (patch) | |
tree | ecfccd327c04d112547749246174fd91999e72f4 /src | |
parent | 9c38e86a5526887f93a3f031b19a0e4fa31745d3 (diff) | |
download | scala-f46ae47fb93867e8d11c80498b5dd2b6c2274b23.tar.gz scala-f46ae47fb93867e8d11c80498b5dd2b6c2274b23.tar.bz2 scala-f46ae47fb93867e8d11c80498b5dd2b6c2274b23.zip |
SI-8407 "symbol not found" in Scaladoc use cases: warning only
The refactoring in aedec1980 mistakenly used the non-silent
typer to typecheck the use cases. It temptingly had the desired
type (`ScalaDocAnalyzer`), but sadly the wrong properties (it will
report errors, rather than buffer.)
This meant that "symbol not found" errors in use cases would prevent
Scaladoc generation.
This commit introduces a little downcast on the silent typer.
A more principled approach would be to go through the rigmarole
of the virtual class pattern for `Analzyer.Typer`, but that will
have to remain work for another day.
Diffstat (limited to 'src')
-rw-r--r-- | src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala b/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala index 212f94c531..e5c64c6f45 100644 --- a/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala +++ b/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala @@ -37,7 +37,7 @@ trait ScaladocAnalyzer extends Analyzer { comment.defineVariables(sym) val typer1 = newTyper(context.makeNewScope(docDef, context.owner)) for (useCase <- comment.useCases) { - typer1.silent(_ => typer1 defineUseCases useCase) match { + typer1.silent(_.asInstanceOf[ScaladocTyper].defineUseCases(useCase)) match { case SilentTypeError(err) => unit.warning(useCase.pos, err.errMsg) case _ => |