mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
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:
parent
0032be0658
commit
5daafbe43b
71 changed files with 1926 additions and 114 deletions
|
@ -70,8 +70,8 @@ public class PackageMultipleModules extends ModuleTestBase {
|
|||
.writeAll()
|
||||
.getOutputLines(Task.OutputKind.DIRECT);
|
||||
|
||||
List<String> expected = Arrays.asList("A.java:1:26: compiler.err.not.def.access.package.cant.access: test.B, test",
|
||||
"B.java:1:26: compiler.err.not.def.access.package.cant.access: test.A, test",
|
||||
List<String> expected = Arrays.asList("A.java:1:22: compiler.err.package.not.visible: test, (compiler.misc.not.def.access.does.not.read: m1, test, m2)",
|
||||
"B.java:1:22: compiler.err.package.not.visible: test, (compiler.misc.not.def.access.does.not.read: m2, test, m1)",
|
||||
"2 errors");
|
||||
if (!log.equals(expected))
|
||||
throw new Exception("expected output not found");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue