[kotlin] Don't use test scope to find actual declarations for K2

* Use moduleWithDependentsScope instead of moduleTestsWithDependentsScope, because the second option searches only for test modules
* #FL-28135

GitOrigin-RevId: 2d0511dce34584a50b197c9825f5f24a9882dae7
This commit is contained in:
Pavel Gromov
2024-09-09 14:31:30 +02:00
committed by intellij-monorepo-bot
parent b0a4091455
commit 8ae080f36d

View File

@@ -21,7 +21,7 @@ class KotlinK2ExpectActualSupport: ExpectActualSupport {
val index = function.valueParameters.indexOf(declaration)
return actualsForExpected(function, module).mapNotNull { (it as? KtCallableDeclaration)?.valueParameters?.getOrNull(index) }.toSet()
}
return declaration.findAllActualForExpect( runReadAction { module?.moduleTestsWithDependentsScope ?: declaration.useScope } ).mapNotNull { it.element }.toSet()
return declaration.findAllActualForExpect( runReadAction { module?.moduleWithDependentsScope ?: declaration.useScope } ).mapNotNull { it.element }.toSet()
}
@OptIn(KaExperimentalApi::class)