From b310d8c2e862d0a0db505eed8a29c15520fba845 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Fri, 14 Mar 2014 13:43:22 -0700 Subject: 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. --- test/files/run/t6440.check | 8 ++++---- test/files/run/t6440b.check | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'test/files/run') diff --git a/test/files/run/t6440.check b/test/files/run/t6440.check index 806279fb74..27d5d1380e 100644 --- a/test/files/run/t6440.check +++ b/test/files/run/t6440.check @@ -1,4 +1,4 @@ -pos: source-newSource1.scala,line-9,offset=109 bad symbolic reference. A signature in U.class refers to term pack1 -in package which is not available. -It may be completely missing from the current classpath, or the version on -the classpath might be incompatible with the version used when compiling U.class. ERROR +pos: source-newSource1.scala,line-9,offset=109 bad symbolic reference to .pack1 encountered in class file 'U.class'. +Cannot access term pack1 in package . The current classpath may be +missing a definition for .pack1, or U.class may have been compiled against a version that's +incompatible with the one found on the current classpath. ERROR diff --git a/test/files/run/t6440b.check b/test/files/run/t6440b.check index 9771ce5efb..0b642c2c35 100644 --- a/test/files/run/t6440b.check +++ b/test/files/run/t6440b.check @@ -1,4 +1,4 @@ -pos: NoPosition bad symbolic reference. A signature in U.class refers to type T -in package pack1 which is not available. -It may be completely missing from the current classpath, or the version on -the classpath might be incompatible with the version used when compiling U.class. ERROR +pos: NoPosition bad symbolic reference to pack1.T encountered in class file 'U.class'. +Cannot access type T in package pack1. The current classpath may be +missing a definition for pack1.T, or U.class may have been compiled against a version that's +incompatible with the one found on the current classpath. ERROR -- cgit v1.2.3