diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-03-14 13:43:22 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-03-14 15:41:29 -0700 |
commit | b310d8c2e862d0a0db505eed8a29c15520fba845 (patch) | |
tree | 64637d3598a9441640fa7245c94fecf1654cddbe /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | efc0905f6b7a78bf3b454fbd9adb50aab5ffe20d (diff) | |
download | scala-b310d8c2e862d0a0db505eed8a29c15520fba845.tar.gz scala-b310d8c2e862d0a0db505eed8a29c15520fba845.tar.bz2 scala-b310d8c2e862d0a0db505eed8a29c15520fba845.zip |
SI-4492 More informative error when class not found on classpath
Position the error based on Select tree that failed to type check,
presumably due to an underlying MissingRequirementError, which has no position.
There are lots of other ways we could rewrap a MRE and supplement position info,
but that remains TODO. Jason's review comment is recorded in the code.
Also try to detect the case of a missing module and provide some advice,
as well as linking to the forthcoming 2.11 guide at
http://docs.scala-lang.org/overviews/core/scala-2.11.html.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 9f3f257529..9f557f4aa5 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4670,8 +4670,8 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper case SilentTypeError(err: AccessTypeError) => (tree1, Some(err)) case SilentTypeError(err) => - context issue err - return setError(tree) + SelectWithUnderlyingError(tree, err) + return tree case SilentResultValue(treeAndPre) => (stabilize(treeAndPre._1, treeAndPre._2, mode, pt), None) } |