One more usage switched to use of new import insertion method

This commit is contained in:
Valentin Kipyatkov
2015-02-10 18:29:24 +03:00
parent 2d4b1d9219
commit 2d6ed5dd42
2 changed files with 12 additions and 12 deletions
@@ -28,8 +28,13 @@ public fun ClassDescriptor.getClassObjectReferenceTarget(): ClassDescriptor {
public fun ClassDescriptor.hasSyntheticClassObject(): Boolean = getKind() in setOf(ENUM_ENTRY, OBJECT)
public fun DeclarationDescriptor.getImportableDescriptor(): DeclarationDescriptor =
if (this is ConstructorDescriptor || DescriptorUtils.isClassObject(this)) getContainingDeclaration()!! else this
public fun DeclarationDescriptor.getImportableDescriptor(): DeclarationDescriptor {
return when {
this is ConstructorDescriptor, DescriptorUtils.isClassObject(this) -> getContainingDeclaration()!!
this is PropertyAccessorDescriptor -> getCorrespondingProperty()
else -> this
}
}
public val DeclarationDescriptor.isExtension: Boolean
get() = this is CallableDescriptor && getExtensionReceiverParameter() != null