Fix binary compatibility with AS Arctic Fox C14

This commit is contained in:
Stanislav Erokhin
2021-04-27 11:13:14 +02:00
committed by Space
parent e70f3daedf
commit e0a834dee6
4 changed files with 30 additions and 0 deletions

View File

@@ -245,6 +245,7 @@ class GenerationState private constructor(
this.moduleName,
languageVersionSettings,
useOldManglingSchemeForFunctionsWithInlineClassesInSignatures,
IncompatibleClassTracker.DoNothing,
target,
isIrBackend
)

View File

@@ -0,0 +1,17 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.codegen.state
import org.jetbrains.kotlin.load.kotlin.KotlinJvmBinaryClass
interface IncompatibleClassTracker {
fun record(binaryClass: KotlinJvmBinaryClass)
object DoNothing : IncompatibleClassTracker {
override fun record(binaryClass: KotlinJvmBinaryClass) {
}
}
}

View File

@@ -87,6 +87,9 @@ class KotlinTypeMapper @JvmOverloads constructor(
private val moduleName: String,
val languageVersionSettings: LanguageVersionSettings,
private val useOldInlineClassesManglingScheme: Boolean,
// temporary returned to preserve binary compatibility with Dagger in IDE
// https://android.googlesource.com/platform/tools/adt/idea/+/refs/heads/mirror-goog-studio-master-dev/dagger/src/com/android/tools/idea/dagger/DaggerAnnotatedElementsSearch.kt
private val incompatibleClassTracker: IncompatibleClassTracker = IncompatibleClassTracker.DoNothing,
val jvmTarget: JvmTarget = JvmTarget.DEFAULT,
private val isIrBackend: Boolean = false,
private val typePreprocessor: ((KotlinType) -> KotlinType?)? = null,

View File

@@ -136,6 +136,15 @@ class KotlinIndicesHelper(
processIndex(KotlinTopLevelPropertyFqnNameIndex.getInstance())
}
// Temporary returned to preserve binary compatibility with AS 203 (ComposeModifierCompletionContributor uses this method)
fun getCallableTopLevelExtensions(
callTypeAndReceiver: CallTypeAndReceiver<*, *>,
position: KtExpression,
bindingContext: BindingContext,
nameFilter: (String) -> Boolean
): Collection<CallableDescriptor> =
getCallableTopLevelExtensions(callTypeAndReceiver, position, bindingContext, null, nameFilter)
fun getCallableTopLevelExtensions(
callTypeAndReceiver: CallTypeAndReceiver<*, *>,
position: KtExpression,