[AA] recognize library module by roots

merging `LLFirSelectingCombinedSymbolProvider.selectFirstElementInClasspathOrder`
relies on the fact that a candidate belongs to exactly one module.
This can be not true for libraries, attached to multiple modules.
 In that case we need to accept "wrong module" to retrieve correct provider
This commit is contained in:
Anna Kozlova
2023-04-21 09:54:27 +02:00
committed by teamcity
parent d491fd2f70
commit e28e8ad7b8
@@ -145,6 +145,19 @@ private class LibraryByRoots(
override val platform: TargetPlatform get() = module.platform
override val analyzerServices: PlatformDependentAnalyzerServices get() = module.analyzerServices
override fun getBinaryRoots(): Collection<Path> = roots
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as LibraryByRoots
return roots == other.roots
}
override fun hashCode(): Int {
return roots.hashCode()
}
override val librarySources: KtLibrarySourceModule? get() = null
}