[AA] Add KotlinModuleDependentsProvider.getRefinementDependents

- When calculating sealed inheritors for expect classes, we need to
  expand the search scope to modules with a depends-on/refinement
  dependency on the module containing the expect class, as these modules
  may contain additional sealed inheritors. `getRefinementDependents`
  allows us to get these refinement dependents to build the proper
  search scope.

^KT-66013
This commit is contained in:
Marco Pennekamp
2024-02-28 21:07:57 +01:00
committed by Space Team
parent 31a65871f2
commit 9bed2e974b
@@ -32,6 +32,12 @@ public abstract class KotlinModuleDependentsProvider {
*/
public abstract fun getTransitiveDependents(module: KtModule): Set<KtModule>
/**
* Returns all refinement/depends-on dependents of [module], excluding [module] itself. The result is transitive because refinement
* dependencies are implicitly transitive.
*/
public abstract fun getRefinementDependents(module: KtModule): Set<KtModule>
public companion object {
public fun getInstance(project: Project): KotlinModuleDependentsProvider =
project.getService(KotlinModuleDependentsProvider::class.java)