Fix binary compatibility with Android plugin (KT-30978)
This commit is contained in:
@@ -171,7 +171,7 @@ class KotlinIndicesHelper(
|
|||||||
val additionalDescriptors = ArrayList<CallableDescriptor>(0)
|
val additionalDescriptors = ArrayList<CallableDescriptor>(0)
|
||||||
|
|
||||||
val lookupLocation = this.file?.let { KotlinLookupLocation(it) } ?: NoLookupLocation.FROM_IDE
|
val lookupLocation = this.file?.let { KotlinLookupLocation(it) } ?: NoLookupLocation.FROM_IDE
|
||||||
for (extension in KotlinIndicesHelperExtension.getInstances(project)) {
|
for (extension in @Suppress("DEPRECATION") KotlinIndicesHelperExtension.getInstances(project)) {
|
||||||
extension.appendExtensionCallables(additionalDescriptors, moduleDescriptor, receiverTypes, nameFilter, lookupLocation)
|
extension.appendExtensionCallables(additionalDescriptors, moduleDescriptor, receiverTypes, nameFilter, lookupLocation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
@@ -27,11 +27,22 @@ interface KotlinIndicesHelperExtension {
|
|||||||
"org.jetbrains.kotlin.kotlinIndicesHelperExtension", KotlinIndicesHelperExtension::class.java
|
"org.jetbrains.kotlin.kotlinIndicesHelperExtension", KotlinIndicesHelperExtension::class.java
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@JvmDefault
|
||||||
fun appendExtensionCallables(
|
fun appendExtensionCallables(
|
||||||
consumer: MutableList<in CallableDescriptor>,
|
consumer: MutableList<in CallableDescriptor>,
|
||||||
moduleDescriptor: ModuleDescriptor,
|
moduleDescriptor: ModuleDescriptor,
|
||||||
receiverTypes: Collection<KotlinType>,
|
receiverTypes: Collection<KotlinType>,
|
||||||
nameFilter: (String) -> Boolean,
|
nameFilter: (String) -> Boolean,
|
||||||
lookupLocation: LookupLocation
|
lookupLocation: LookupLocation
|
||||||
|
) {
|
||||||
|
appendExtensionCallables(consumer, moduleDescriptor, receiverTypes, nameFilter)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated("Use the appendExtensionCallables() with the 'file' parameter instead.")
|
||||||
|
fun appendExtensionCallables(
|
||||||
|
consumer: MutableList<in CallableDescriptor>,
|
||||||
|
moduleDescriptor: ModuleDescriptor,
|
||||||
|
receiverTypes: Collection<KotlinType>,
|
||||||
|
nameFilter: (String) -> Boolean
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
+10
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.incremental.components.LookupTracker
|
|||||||
import org.jetbrains.kotlin.storage.LockBasedStorageManager
|
import org.jetbrains.kotlin.storage.LockBasedStorageManager
|
||||||
import org.jetbrains.kotlin.synthetic.JavaSyntheticPropertiesScope
|
import org.jetbrains.kotlin.synthetic.JavaSyntheticPropertiesScope
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
|
import java.lang.IllegalStateException
|
||||||
|
|
||||||
class DebuggerFieldKotlinIndicesHelperExtension : KotlinIndicesHelperExtension {
|
class DebuggerFieldKotlinIndicesHelperExtension : KotlinIndicesHelperExtension {
|
||||||
override fun appendExtensionCallables(
|
override fun appendExtensionCallables(
|
||||||
@@ -31,4 +32,13 @@ class DebuggerFieldKotlinIndicesHelperExtension : KotlinIndicesHelperExtension {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun appendExtensionCallables(
|
||||||
|
consumer: MutableList<in CallableDescriptor>,
|
||||||
|
moduleDescriptor: ModuleDescriptor,
|
||||||
|
receiverTypes: Collection<KotlinType>,
|
||||||
|
nameFilter: (String) -> Boolean
|
||||||
|
) {
|
||||||
|
throw IllegalStateException("Should not be called")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+9
@@ -56,4 +56,13 @@ class AndroidIndicesHelperExtension : KotlinIndicesHelperExtension {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun appendExtensionCallables(
|
||||||
|
consumer: MutableList<in CallableDescriptor>,
|
||||||
|
moduleDescriptor: ModuleDescriptor,
|
||||||
|
receiverTypes: Collection<KotlinType>,
|
||||||
|
nameFilter: (String) -> Boolean
|
||||||
|
) {
|
||||||
|
throw IllegalStateException("Should not be called")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user