Add a LookupLocation to 'getSyntheticExtensionProperties()', use it in 'DebuggerFieldSyntheticScopeProvider'

This commit is contained in:
Yan Zhulanow
2018-11-27 15:04:48 +09:00
parent dc34f11f50
commit 3c8714696d
6 changed files with 38 additions and 23 deletions
@@ -30,7 +30,7 @@ interface SyntheticScope {
fun getSyntheticStaticFunctions(scope: ResolutionScope, name: Name, location: LookupLocation): Collection<FunctionDescriptor>
fun getSyntheticConstructors(scope: ResolutionScope, name: Name, location: LookupLocation): Collection<FunctionDescriptor>
fun getSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>): Collection<PropertyDescriptor>
fun getSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>, location: LookupLocation): Collection<PropertyDescriptor>
fun getSyntheticMemberFunctions(receiverTypes: Collection<KotlinType>): Collection<FunctionDescriptor>
fun getSyntheticStaticFunctions(scope: ResolutionScope): Collection<FunctionDescriptor>
fun getSyntheticConstructors(scope: ResolutionScope): Collection<FunctionDescriptor>
@@ -70,7 +70,10 @@ interface SyntheticScope {
return emptyList()
}
override fun getSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>): Collection<PropertyDescriptor> {
override fun getSyntheticExtensionProperties(
receiverTypes: Collection<KotlinType>,
location: LookupLocation
): Collection<PropertyDescriptor> {
return emptyList()
}
@@ -113,8 +116,8 @@ fun SyntheticScopes.collectSyntheticStaticFunctions(scope: ResolutionScope, name
fun SyntheticScopes.collectSyntheticConstructors(scope: ResolutionScope, name: Name, location: LookupLocation)
= scopes.flatMap { it.getSyntheticConstructors(scope, name, location) }
fun SyntheticScopes.collectSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>)
= scopes.flatMap { it.getSyntheticExtensionProperties(receiverTypes) }
fun SyntheticScopes.collectSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>, location: LookupLocation)
= scopes.flatMap { it.getSyntheticExtensionProperties(receiverTypes, location) }
fun SyntheticScopes.collectSyntheticMemberFunctions(receiverTypes: Collection<KotlinType>)
= scopes.flatMap { it.getSyntheticMemberFunctions(receiverTypes) }