diff --git a/ChangeLog.md b/ChangeLog.md index 173d1b8331d..c92f6232dfe 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -470,6 +470,7 @@ These artifacts include extensions for the types available in the latter JDKs, s - Project View: Fix presentation of Kotlin files and their members when @JvmName having the same name as the file itself - [`KT-15611`](https://youtrack.jetbrains.com/issue/KT-15611) Extract Interface/Superclass: Disable const-properties +- Pull Up: Fix pull-up from object to superclass #### Intention actions, inspections and quickfixes diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/memberInfoUtils.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/memberInfoUtils.kt index c569170fb98..bfcb275cc39 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/memberInfoUtils.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/memberInfo/memberInfoUtils.kt @@ -33,7 +33,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getElementTextWithContext fun PsiNamedElement.getClassDescriptorIfAny(resolutionFacade: ResolutionFacade? = null): ClassDescriptor? { return when (this) { - is KtClass -> (resolutionFacade ?: getResolutionFacade()).resolveToDescriptor(this) as ClassDescriptor + is KtClassOrObject -> (resolutionFacade ?: getResolutionFacade()).resolveToDescriptor(this) as ClassDescriptor is PsiClass -> getJavaClassDescriptor() else -> null }