8166538: Improve error reporting for compiling against unexported package

When a type cannot be found, look into other modules, search for possible viable types, and report them conveniently to the user.

Reviewed-by: mcimadamore, jjg
This commit is contained in:
Jan Lahoda 2016-11-02 16:48:57 +01:00
parent 0032be0658
commit 5daafbe43b
71 changed files with 1926 additions and 114 deletions

View file

@ -177,7 +177,7 @@ public class EdgeCases extends ModuleTestBase {
.writeAll()
.getOutput(Task.OutputKind.DIRECT);
if (!log.contains("Test.java:1:52: compiler.err.not.def.access.class.intf.cant.access: call(), api1.Api1") ||
if (!log.contains("Test.java:1:52: compiler.err.not.def.access.class.intf.cant.access.reason: call(), api1.Api1, api1, (compiler.misc.not.def.access.does.not.read: m3, api1, m1)") ||
!log.contains("Test.java:1:76: compiler.err.not.def.access.class.intf.cant.access: toString(), java.lang.Object"))
throw new Exception("expected output not found");
}