Fix UL inline class delegate loading for tooComplex case (#KT-31950 Fixed)

This commit is contained in:
Igor Yakovlev
2019-06-19 15:12:35 +03:00
parent 685f56e179
commit 3146b12471
2 changed files with 2 additions and 5 deletions
@@ -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) }