Minor: inline last usages of deprecated JetScope::getFunctions(Name) and drop it
This commit is contained in:
+3
-2
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl
|
||||
import org.jetbrains.kotlin.descriptors.impl.PropertyGetterDescriptorImpl
|
||||
import org.jetbrains.kotlin.descriptors.impl.PropertySetterDescriptorImpl
|
||||
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
@@ -99,13 +100,13 @@ class JavaSyntheticPropertiesScope(storageManager: StorageManager) : JetScopeImp
|
||||
|
||||
val memberScope = ownerClass.unsubstitutedMemberScope
|
||||
val getMethod = possibleGetMethodNames(name)
|
||||
.flatMap { memberScope.getFunctions(it).asSequence() }
|
||||
.flatMap { memberScope.getFunctions(it, NoLookupLocation.UNSORTED).asSequence() }
|
||||
.singleOrNull {
|
||||
isGoodGetMethod(it) && it.hasJavaOriginInHierarchy()
|
||||
} ?: return null
|
||||
|
||||
|
||||
val setMethod = memberScope.getFunctions(setMethodName(getMethod.name))
|
||||
val setMethod = memberScope.getFunctions(setMethodName(getMethod.name), NoLookupLocation.UNSORTED)
|
||||
.singleOrNull { isGoodSetMethod(it, getMethod) }
|
||||
|
||||
val propertyType = getMethod.returnType ?: return null
|
||||
|
||||
@@ -50,8 +50,6 @@ public interface JetScope {
|
||||
// Temporary overloads which will be dropped when all usages will be processed
|
||||
@deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, NoLookupLocation.UNSORTED)"))
|
||||
public final fun getClassifier(name: Name): ClassifierDescriptor? = getClassifier(name, NoLookupLocation.UNSORTED)
|
||||
@deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getFunctions(name, NoLookupLocation.UNSORTED)"))
|
||||
public final fun getFunctions(name: Name): Collection<FunctionDescriptor> = getFunctions(name, NoLookupLocation.UNSORTED)
|
||||
|
||||
/**
|
||||
* All visible descriptors from current scope.
|
||||
|
||||
@@ -80,12 +80,6 @@ public class ErrorUtils {
|
||||
public ClassifierDescriptor getClassifier(@NotNull Name name) {
|
||||
return getClassifier(name, NoLookupLocation.UNSORTED);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<FunctionDescriptor> getFunctions(@NotNull Name name) {
|
||||
return getFunctions(name, NoLookupLocation.UNSORTED);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ErrorScope extends AbstractErrorScope {
|
||||
|
||||
Reference in New Issue
Block a user