Change return type of KtScope.getProperties()

This commit is contained in:
Stanislav Erokhin
2015-10-31 09:43:50 +03:00
parent 7cd667c0e3
commit 6412df2e0b
20 changed files with 43 additions and 49 deletions
@@ -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()
}
@@ -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)
@@ -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)
}
@@ -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()