Change return type of KtScope.getProperties()
This commit is contained in:
+1
-2
@@ -206,8 +206,7 @@ public class DeserializedClassDescriptor(
|
||||
override fun computeNonDeclaredProperties(name: Name, descriptors: MutableCollection<PropertyDescriptor>) {
|
||||
val fromSupertypes = ArrayList<PropertyDescriptor>()
|
||||
for (supertype in classDescriptor.getTypeConstructor().supertypes) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fromSupertypes.addAll(supertype.memberScope.getProperties(name, NoLookupLocation.FOR_ALREADY_TRACKED) as Collection<PropertyDescriptor>)
|
||||
fromSupertypes.addAll(supertype.memberScope.getProperties(name, NoLookupLocation.FOR_ALREADY_TRACKED))
|
||||
}
|
||||
generateFakeOverrides(name, fromSupertypes, descriptors)
|
||||
}
|
||||
|
||||
+3
-3
@@ -50,7 +50,7 @@ public abstract class DeserializedMemberScope protected constructor(
|
||||
private val functions =
|
||||
c.storageManager.createMemoizedFunction<Name, Collection<FunctionDescriptor>> { computeFunctions(it) }
|
||||
private val properties =
|
||||
c.storageManager.createMemoizedFunction<Name, Collection<VariableDescriptor>> { computeProperties(it) }
|
||||
c.storageManager.createMemoizedFunction<Name, Collection<PropertyDescriptor>> { computeProperties(it) }
|
||||
|
||||
protected open fun filteredFunctionProtos(protos: Collection<ProtoBuf.Function>): Collection<ProtoBuf.Function> = protos
|
||||
|
||||
@@ -87,7 +87,7 @@ public abstract class DeserializedMemberScope protected constructor(
|
||||
return functions(name)
|
||||
}
|
||||
|
||||
private fun computeProperties(name: Name): Collection<VariableDescriptor> {
|
||||
private fun computeProperties(name: Name): Collection<PropertyDescriptor> {
|
||||
val protos = propertyProtos()[ProtoKey(name, isExtension = false)].orEmpty() +
|
||||
propertyProtos()[ProtoKey(name, isExtension = true)].orEmpty()
|
||||
|
||||
@@ -102,7 +102,7 @@ public abstract class DeserializedMemberScope protected constructor(
|
||||
protected open fun computeNonDeclaredProperties(name: Name, descriptors: MutableCollection<PropertyDescriptor>) {
|
||||
}
|
||||
|
||||
override fun getProperties(name: Name, location: LookupLocation): Collection<VariableDescriptor> {
|
||||
override fun getProperties(name: Name, location: LookupLocation): Collection<PropertyDescriptor> {
|
||||
recordLookup(name, location)
|
||||
return properties.invoke(name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user