JVM: fix "module reads" check in JavaModuleGraph
There was a bug in the DFS. Whenever we encountered a "requires transitive X" directive in some module, we recursively invoked DFS not on X but on `dependencyName`, which is the target module that we're trying to find the path to. And that always failed, because no module requires itself. #KT-66275 Fixed
This commit is contained in:
committed by
Space Team
parent
fecc5ba501
commit
94e5cafb61
@@ -77,7 +77,7 @@ class JavaModuleGraph(finder: JavaModuleFinder) {
|
||||
is JavaModule.Explicit -> {
|
||||
for ((dependencyModuleName, isTransitive) in module.moduleInfo.requires) {
|
||||
if (dependencyModuleName == dependencyName) return true
|
||||
if (isTransitive && dfs(dependencyName)) return true
|
||||
if (isTransitive && dfs(dependencyModuleName)) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user