Minor: inline last usages of deprecated JetScope::getFunctions(Name) and drop it

This commit is contained in:
Zalim Bashorov
2015-08-18 22:04:59 +03:00
parent a395b8b4dd
commit 4dbc08635c
3 changed files with 3 additions and 10 deletions
@@ -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