Use module path instead of class path for stdlib on Java 9
Also report the "named does not read unnamed" error, which was not possible previously because we wouldn't be able to read anything from kotlin-stdlib (because it was added to the unnamed module by default)
This commit is contained in:
+1
-3
@@ -68,9 +68,7 @@ class JvmModuleAccessibilityChecker(project: Project) : CallChecker {
|
||||
|
||||
return when (diagnostic) {
|
||||
is ModuleDoesNotReadUnnamedModule ->
|
||||
// TODO: report this error as soon as module path is used instead of class path for modular compilation
|
||||
// JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE.on(reportOn)
|
||||
null
|
||||
JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE.on(reportOn)
|
||||
is ModuleDoesNotReadModule ->
|
||||
JAVA_MODULE_DOES_NOT_DEPEND_ON_MODULE.on(reportOn, diagnostic.dependencyModuleName)
|
||||
is ModuleDoesNotExportPackage ->
|
||||
|
||||
+2
-1
@@ -74,7 +74,8 @@ class JavaModuleInfo(
|
||||
}
|
||||
|
||||
override fun visitExport(packageFqName: String, access: Int, modules: Array<String>?) {
|
||||
exports.add(Exports(FqName(packageFqName), modules?.toList().orEmpty()))
|
||||
// For some reason, '/' is the delimiter in packageFqName here
|
||||
exports.add(Exports(FqName(packageFqName.replace('/', '.')), modules?.toList().orEmpty()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user