Simplify allDesciptors computation
Do not split descriptors into declared/non-declared groups It should not be important as order of non-declared members' appearance does not affect stub building, deserialization and other order-sensitive stuff
This commit is contained in:
+2
-9
@@ -154,8 +154,6 @@ abstract class DeserializedMemberScope protected constructor(
|
||||
|
||||
addFunctionsAndProperties(result, kindFilter, nameFilter, location)
|
||||
|
||||
addNonDeclaredDescriptors(result, location)
|
||||
|
||||
if (kindFilter.acceptsKinds(DescriptorKindFilter.CLASSIFIERS_MASK)) {
|
||||
addClassifierDescriptors(result, nameFilter)
|
||||
}
|
||||
@@ -171,7 +169,7 @@ abstract class DeserializedMemberScope protected constructor(
|
||||
) {
|
||||
if (kindFilter.acceptsKinds(DescriptorKindFilter.VARIABLES_MASK)) {
|
||||
addMembers(
|
||||
propertyProtos.keys,
|
||||
getVariableNames(),
|
||||
nameFilter,
|
||||
result
|
||||
) { getContributedVariables(it, location) }
|
||||
@@ -179,7 +177,7 @@ abstract class DeserializedMemberScope protected constructor(
|
||||
|
||||
if (kindFilter.acceptsKinds(DescriptorKindFilter.FUNCTIONS_MASK)) {
|
||||
addMembers(
|
||||
functionProtos.keys,
|
||||
getFunctionNames(),
|
||||
nameFilter,
|
||||
result
|
||||
) { getContributedFunctions(it, location) }
|
||||
@@ -203,11 +201,6 @@ abstract class DeserializedMemberScope protected constructor(
|
||||
result.addAll(subResult)
|
||||
}
|
||||
|
||||
protected fun addNonDeclaredDescriptors(result: MutableCollection<DeclarationDescriptor>, location: LookupLocation) {
|
||||
result.addAll(getNonDeclaredFunctionNames().flatMap { getContributedFunctions(it, location) })
|
||||
result.addAll(getNonDeclaredVariableNames().flatMap { getContributedVariables(it, location) })
|
||||
}
|
||||
|
||||
protected abstract fun getNonDeclaredFunctionNames(): Set<Name>
|
||||
protected abstract fun getNonDeclaredVariableNames(): Set<Name>
|
||||
protected abstract fun getNonDeclaredTypeAliasNames(): Set<Name>
|
||||
|
||||
Reference in New Issue
Block a user