Change return type of KtScope.getProperties()
This commit is contained in:
+1
-1
@@ -414,7 +414,7 @@ public class LazyJavaClassMemberScope(
|
||||
|
||||
private fun getPropertiesFromSupertypes(name: Name): Set<PropertyDescriptor> {
|
||||
return getContainingDeclaration().typeConstructor.supertypes.flatMap {
|
||||
it.memberScope.getProperties(name, NoLookupLocation.WHEN_GET_SUPER_MEMBERS).map { p -> p as PropertyDescriptor }
|
||||
it.memberScope.getProperties(name, NoLookupLocation.WHEN_GET_SUPER_MEMBERS).map { p -> p }
|
||||
}.toSet()
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -106,10 +106,11 @@ public class LazyJavaPackageScope(
|
||||
return classes(name)
|
||||
}
|
||||
|
||||
override fun getProperties(name: Name, location: LookupLocation): Collection<VariableDescriptor> {
|
||||
override fun getProperties(name: Name, location: LookupLocation): Collection<PropertyDescriptor> {
|
||||
recordLookup(name, location)
|
||||
return deserializedPackageScope().getProperties(name, NoLookupLocation.FOR_ALREADY_TRACKED)
|
||||
}
|
||||
|
||||
override fun getFunctions(name: Name, location: LookupLocation): List<FunctionDescriptor> {
|
||||
recordLookup(name, location)
|
||||
return deserializedPackageScope().getFunctions(name, NoLookupLocation.FOR_ALREADY_TRACKED) + super.getFunctions(name, NoLookupLocation.FOR_ALREADY_TRACKED)
|
||||
|
||||
+1
-1
@@ -298,7 +298,7 @@ public abstract class LazyJavaScope(
|
||||
return propertyType
|
||||
}
|
||||
|
||||
override fun getProperties(name: Name, location: LookupLocation): Collection<VariableDescriptor> {
|
||||
override fun getProperties(name: Name, location: LookupLocation): Collection<PropertyDescriptor> {
|
||||
recordLookup(name, location)
|
||||
return properties(name)
|
||||
}
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ public class LazyJavaStaticClassScope(
|
||||
|
||||
if (staticScope !is LazyJavaStaticClassScope) return getStaticPropertiesFromJavaSupertypes(name, superTypeDescriptor)
|
||||
|
||||
return staticScope.getProperties(name, NoLookupLocation.WHEN_GET_SUPER_MEMBERS).map { it as PropertyDescriptor }
|
||||
return staticScope.getProperties(name, NoLookupLocation.WHEN_GET_SUPER_MEMBERS).map { it }
|
||||
}
|
||||
|
||||
return descriptor.typeConstructor.supertypes.flatMap(::getStaticProperties).toSet()
|
||||
|
||||
Reference in New Issue
Block a user