mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +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
|
@ -216,8 +216,8 @@ public class AddLimitMods extends ModuleTestBase {
|
|||
|
||||
private static final List<Entry<String[], String>> variants = Arrays.asList(
|
||||
new SimpleEntry<String[], String>(new String[] {},
|
||||
"Test.java:2:18: compiler.err.doesnt.exist: javax.annotation\n"
|
||||
+ "Test.java:5:19: compiler.err.doesnt.exist: javax.xml.bind\n"
|
||||
"Test.java:2:7: compiler.err.package.not.visible: javax.annotation, (compiler.misc.not.def.access.does.not.read.from.unnamed: javax.annotation, java.annotations.common)\n"
|
||||
+ "Test.java:5:14: compiler.err.package.not.visible: javax.xml.bind, (compiler.misc.not.def.access.does.not.read.from.unnamed: javax.xml.bind, java.xml.bind)\n"
|
||||
+ "2 errors\n"),
|
||||
new SimpleEntry<String[], String>(new String[] {"--add-modules", "java.annotations.common,java.xml.bind"},
|
||||
null),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue