8189765: Improve error reporting for compiling against package not visible due to modules

When looking in other modules for an undefined Symbol, also look into the unnamed module.

Reviewed-by: mcimadamore
This commit is contained in:
Jan Lahoda 2018-04-12 09:23:34 +02:00
parent 8483faa4a9
commit 594fb594ce
4 changed files with 9 additions and 8 deletions

View file

@ -77,7 +77,7 @@ public class ModulesAndClassPathTest extends ModuleTestBase {
.writeAll()
.getOutputLines(Task.OutputKind.DIRECT);
List<String> expected = Arrays.asList("Impl.java:1:38: compiler.err.doesnt.exist: api",
List<String> expected = Arrays.asList("Impl.java:1:35: compiler.err.package.not.visible: api, (compiler.misc.not.def.access.does.not.read.unnamed: api, m)",
"1 error");
if (!expected.equals(modLog)) {
@ -129,7 +129,7 @@ public class ModulesAndClassPathTest extends ModuleTestBase {
.writeAll()
.getOutputLines(Task.OutputKind.DIRECT);
List<String> expected = Arrays.asList("Impl.java:1:38: compiler.err.doesnt.exist: api",
List<String> expected = Arrays.asList("Impl.java:1:35: compiler.err.package.not.visible: api, (compiler.misc.not.def.access.does.not.read.unnamed: api, m)",
"1 error");
if (!expected.equals(modLog)) {
@ -170,7 +170,7 @@ public class ModulesAndClassPathTest extends ModuleTestBase {
.writeAll()
.getOutputLines(Task.OutputKind.DIRECT);
List<String> expected = Arrays.asList("Impl.java:1:38: compiler.err.doesnt.exist: api",
List<String> expected = Arrays.asList("Impl.java:1:35: compiler.err.package.not.visible: api, (compiler.misc.not.def.access.does.not.read.unnamed: api, m)",
"1 error");
if (!expected.equals(modLog)) {