Pull Up: Fix subclass map initialization which prevents pull-up from object to superclass

This commit is contained in:
Alexey Sedunov
2017-01-10 17:53:14 +03:00
parent 6fb943765d
commit edf5d7da10
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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
@@ -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
}