Fix UL inline class delegate loading for tooComplex case (#KT-31950 Fixed)
This commit is contained in:
+1
-4
@@ -21,9 +21,6 @@ class KtUltraLightInlineClass(
|
||||
support: KtUltraLightSupport
|
||||
) : KtUltraLightClass(classOrObject, support) {
|
||||
|
||||
override fun getDelegate(): PsiClass =
|
||||
throw IllegalStateException("Cls delegate shouldn't be loaded for not too complex ultra-light classes! Qualified name: $qualifiedName")
|
||||
|
||||
override fun getScope(): PsiElement? = parent
|
||||
|
||||
private val membersBuilder: UltraLightMembersCreator by lazyPub {
|
||||
@@ -74,7 +71,7 @@ class KtUltraLightInlineClass(
|
||||
|
||||
override fun getOwnFields(): List<KtLightField> = emptyList()
|
||||
|
||||
override fun getOwnMethods() = _ownMethods
|
||||
override fun getOwnMethods() = if (tooComplex) super.getOwnMethods() else _ownMethods
|
||||
|
||||
override fun getVisibleSignatures(): MutableCollection<HierarchicalMethodSignature> = PsiSuperMethodImplUtil.getVisibleSignatures(this)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ open class KtUltraLightClass(classOrObject: KtClassOrObject, internal val suppor
|
||||
)
|
||||
}
|
||||
|
||||
private val tooComplex: Boolean by lazyPub { support.isTooComplexForUltraLightGeneration(classOrObject) }
|
||||
protected val tooComplex: Boolean by lazyPub { support.isTooComplexForUltraLightGeneration(classOrObject) }
|
||||
|
||||
private val _deprecated by lazyPub { classOrObject.isDeprecated(support) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user