Implement Java 9 module visibility checks

In this commit, only IDE tests are added, because we look for module
declarations in the IDE across the whole project, whereas in the
compiler we should do this on the module path only and that requires
separate work (KT-18599) which is done in the following commits.

(The change in Cache.kt is needed so that
JvmModuleAccessibilityChecker.ClassifierUsage, which is an inner class,
would be injected properly.)

 #KT-18598 In Progress
 #KT-18599 In Progress

Original commit: e32880d9a3
This commit is contained in:
Alexander Udalov
2017-05-18 19:05:53 +03:00
parent d4f67643d8
commit 186b002a01
@@ -939,7 +939,7 @@ class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
}
fun testJre9() {
val path = KotlinTestUtils.getJre9HomeIfPossible()?.absolutePath ?: return
val path = KotlinTestUtils.getJdk9HomeIfPossible()?.absolutePath ?: return
val jdk = myModel.global.addSdk(JDK_NAME, path, "9", JpsJavaSdkType.INSTANCE)
jdk.addRoot(StandardFileSystems.JRT_PROTOCOL_PREFIX + path + URLUtil.JAR_SEPARATOR + "java.base", JpsOrderRootType.COMPILED)