Fix incorrect behavior and refactor JvmModuleAccessibilityChecker
Previously we assumed that a symbol is accessible if its containing package is exported by module-info.java. Which was obviously wrong and could lead to a situation where a symbol would be incorrectly accessible if a usage module has a dependency on the symbol's module in IDEA project terms, but does not require it in its module-info.java #KT-18598 In Progress
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
package foo;
|
||||
|
||||
public class Foo {}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
module dependency {
|
||||
exports foo;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
module main {
|
||||
// does not require dependency
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import foo.<error>Foo</error>
|
||||
|
||||
fun usage() {
|
||||
<error>Foo</error>()
|
||||
}
|
||||
Reference in New Issue
Block a user