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
@@ -87,5 +87,5 @@ fun getSourceElement(descriptor: DeclarationDescriptor): SourceElement =
descriptor.toSourceElement
}
private val DeclarationDescriptor.toSourceElement: SourceElement
val DeclarationDescriptor.toSourceElement: SourceElement
get() = if (this is DeclarationDescriptorWithSource) source else SourceElement.NO_SOURCE
@@ -227,7 +227,10 @@ class JavaSyntheticPropertiesScope(storageManager: StorageManager, private val l
return result
}
override fun getSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>): Collection<PropertyDescriptor> {
override fun getSyntheticExtensionProperties(
receiverTypes: Collection<KotlinType>,
location: LookupLocation
): Collection<PropertyDescriptor> {
val result = ArrayList<PropertyDescriptor>()
val processedTypes = HashSet<TypeConstructor>()
receiverTypes.forEach { result.collectSyntheticProperties(it.constructor, processedTypes) }