Revert "Force recompile all call-sites of ExpectedActualResolver.{findActualForExpected, findExpectedForActual}"
This reverts commit529a1dd720. This commit was needed to workaround broken incremental compilation in JPS in Kotlin plugin. The incremental compilation bug is reported KT-60759 As promised in529a1dd720, after a few days in `master` I revert it Review: https://jetbrains.team/p/kt/reviews/11724/timeline
This commit is contained in:
+3
-4
@@ -54,8 +54,7 @@ object ExpectedActualResolver {
|
||||
}
|
||||
}
|
||||
|
||||
// incremental compilation workaround for KT-60759
|
||||
fun findExpectedForActual_incrementalCompilationWorkaround(
|
||||
fun findExpectedForActual(
|
||||
actual: MemberDescriptor,
|
||||
moduleFilter: (ModuleDescriptor) -> Boolean = allModulesProvidingExpectsFor(actual.module),
|
||||
shouldCheckAbsenceOfDefaultParamsInActual: Boolean = false,
|
||||
@@ -68,7 +67,7 @@ object ExpectedActualResolver {
|
||||
is ClassifierDescriptorWithTypeParameters -> {
|
||||
// TODO: replace with 'singleOrNull' as soon as multi-module diagnostic tests are refactored
|
||||
val expectedClass =
|
||||
findExpectedForActual_incrementalCompilationWorkaround(container, moduleFilter, shouldCheckAbsenceOfDefaultParamsInActual)?.values
|
||||
findExpectedForActual(container, moduleFilter, shouldCheckAbsenceOfDefaultParamsInActual)?.values
|
||||
?.firstOrNull()?.firstOrNull() as? ClassDescriptor
|
||||
with(context) {
|
||||
expectedClass?.getMembersForExpectClass(actual.name)?.filterIsInstance<CallableMemberDescriptor>().orEmpty()
|
||||
@@ -184,7 +183,7 @@ fun MemberDescriptor.findAnyActualsForExpected(
|
||||
fun MemberDescriptor.findCompatibleExpectsForActual(
|
||||
moduleFilter: ModuleFilter = allModulesProvidingExpectsFor(module)
|
||||
): List<MemberDescriptor> =
|
||||
ExpectedActualResolver.findExpectedForActual_incrementalCompilationWorkaround(this, moduleFilter)?.get(Compatible).orEmpty()
|
||||
ExpectedActualResolver.findExpectedForActual(this, moduleFilter)?.get(Compatible).orEmpty()
|
||||
|
||||
fun DeclarationDescriptor.findExpects(): List<MemberDescriptor> {
|
||||
if (this !is MemberDescriptor) return emptyList()
|
||||
|
||||
Reference in New Issue
Block a user