diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-17 11:49:37 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-17 15:55:55 +0200 |
commit | 064bc5eb25094f0d6de2aa8990466fed29d3c095 (patch) | |
tree | a116636150d637db50482edb13d9041137136ae2 | |
parent | 43da1dbbe99e8bdb98d9e08b8e3a255dd4af6902 (diff) | |
download | scala-064bc5eb25094f0d6de2aa8990466fed29d3c095.tar.gz scala-064bc5eb25094f0d6de2aa8990466fed29d3c095.tar.bz2 scala-064bc5eb25094f0d6de2aa8990466fed29d3c095.zip |
Remove `def error(pos: Position, err: Throwable)`
The overload was used only once.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 5 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index f5f9494562..e7ab9dc94e 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -604,11 +604,6 @@ trait Contexts { self: Analyzer => /** Issue/buffer/throw the given implicit ambiguity error according to the current mode for error reporting. */ private[typechecker] def issueAmbiguousError(err: AbsTypeError) = issueCommon(err, ambiguousErrors) - /** Issue/throw the given `err` according to the current mode for error reporting. */ - def error(pos: Position, err: Throwable) = - if (reportErrors) unitError(pos, addDiagString(err.getMessage())) - else throw err - /** Issue/throw the given error message according to the current mode for error reporting. */ def error(pos: Position, msg: String) = { val msg1 = addDiagString(msg) diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala index fbea69db5a..89b064e7c1 100644 --- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala +++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala @@ -629,7 +629,7 @@ trait TypeDiagnostics { throw new FatalError("cannot redefine root "+sym) } case _ => - context0.error(ex.pos, ex) + context0.error(ex.pos, ex.msg) } } } |