Fix "operator modifier required" errors in project
This commit is contained in:
@@ -220,7 +220,7 @@ public class ReifiedTypeParameterMappings() {
|
||||
mappingsByName[name] = ReifiedTypeParameterMapping(name, type = null, asmType = null, newName = newName, signature = null)
|
||||
}
|
||||
|
||||
fun get(name: String): ReifiedTypeParameterMapping? {
|
||||
operator fun get(name: String): ReifiedTypeParameterMapping? {
|
||||
return mappingsByName[name]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class JvmDependenciesIndex(_roots: List<JavaRoot>) {
|
||||
private class Cache {
|
||||
private val innerPackageCaches = HashMap<String, Cache>()
|
||||
|
||||
fun get(name: String) = innerPackageCaches.getOrPut(name) { Cache() }
|
||||
operator fun get(name: String) = innerPackageCaches.getOrPut(name) { Cache() }
|
||||
|
||||
// indices of roots that are known to contain this package
|
||||
// if this list contains [1, 3, 5] then roots with indices 1, 3 and 5 are known to contain this package, 2 and 4 are known not to (no information about roots 6 or higher)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getChildrenOfType
|
||||
|
||||
data class PositionalAndNamedArguments(val positional: List<ValueArgument>, val named: List<ValueArgument>)
|
||||
{
|
||||
fun get(position: Int, name: String): ValueArgument? =
|
||||
operator fun get(position: Int, name: String): ValueArgument? =
|
||||
positional.getOrNull(position) ?: named.find { it.getArgumentName()!!.asName.asString() == name }
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,6 @@ public fun StorageComponentContainer.useInstance(instance: Any) {
|
||||
registerInstance(instance)
|
||||
}
|
||||
|
||||
public inline fun <reified T : Any> ComponentProvider.get(thisRef: Any?, desc: PropertyMetadata): T {
|
||||
inline operator fun <reified T : Any> ComponentProvider.getValue(thisRef: Any?, desc: PropertyMetadata): T {
|
||||
return getService(javaClass<T>())
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ public fun PsiElement.getTextWithLocation(): String = "'${this.getText()}' at ${
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public fun SearchScope.contains(element: PsiElement): Boolean = PsiSearchScopeUtil.isInScope(this, element)
|
||||
operator fun SearchScope.contains(element: PsiElement): Boolean = PsiSearchScopeUtil.isInScope(this, element)
|
||||
|
||||
public fun <E : PsiElement> E.createSmartPointer(): SmartPsiElementPointer<E> =
|
||||
SmartPointerManager.getInstance(getProject()).createSmartPsiElementPointer(this)
|
||||
|
||||
@@ -96,7 +96,7 @@ abstract class WritableScopeStorage(val redeclarationHandler: RedeclarationHandl
|
||||
|
||||
private fun Int.descriptorByIndex() = addedDescriptors[this]
|
||||
|
||||
private fun IntList?.plus(value: Int) = IntList(value, this)
|
||||
private operator fun IntList?.plus(value: Int) = IntList(value, this)
|
||||
|
||||
private fun <TDescriptor: DeclarationDescriptor> IntList.toDescriptors(): List<TDescriptor> {
|
||||
val result = ArrayList<TDescriptor>(1)
|
||||
|
||||
@@ -60,7 +60,7 @@ public class KtLightClassForFacade private constructor(
|
||||
{ CachedValueProvider.Result.create(FacadeCacheData(), PsiModificationTracker.OUT_OF_CODE_BLOCK_MODIFICATION_COUNT) },
|
||||
/*trackValue = */ false)
|
||||
|
||||
public fun get(qualifiedName: FqName, searchScope: GlobalSearchScope): CachedValue<KotlinFacadeLightClassData> {
|
||||
public operator fun get(qualifiedName: FqName, searchScope: GlobalSearchScope): CachedValue<KotlinFacadeLightClassData> {
|
||||
synchronized (cachedValue) {
|
||||
return cachedValue.getValue().cache.get(StubCacheKey(qualifiedName, searchScope))
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.tests.di
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.container.StorageComponentContainer
|
||||
import org.jetbrains.kotlin.container.createContainer
|
||||
import org.jetbrains.kotlin.container.get
|
||||
import org.jetbrains.kotlin.container.getValue
|
||||
import org.jetbrains.kotlin.container.useImpl
|
||||
import org.jetbrains.kotlin.context.ModuleContext
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
|
||||
Reference in New Issue
Block a user