[light classes] drop redundant KtLightSimpleModifierList

^KT-53097
This commit is contained in:
Dmitry Gridin
2022-07-27 19:47:43 +02:00
committed by Space
parent 9606d49379
commit be45a329d6
2 changed files with 2 additions and 10 deletions
@@ -56,7 +56,7 @@ internal class KtUltraLightSuspendContinuationParameter(
ktType?.asPsiType(support, TypeMappingMode.DEFAULT, method) ?: PsiType.NULL
}
private val lightModifierList by lazyPub { KtLightSimpleModifierList(this, emptySet()) }
private val lightModifierList by lazyPub { KtUltraLightSimpleModifierList(this, emptySet()) }
override fun getType(): PsiType = psiType
@@ -94,7 +94,7 @@ internal abstract class KtUltraLightParameter(
return another is KtParameter && kotlinOrigin?.isEquivalentTo(another) == true || this == another
}
private val lightModifierList by lazyPub { KtLightSimpleModifierList(this, emptySet()) }
private val lightModifierList by lazyPub { KtUltraLightSimpleModifierList(this, emptySet()) }
override fun getModifierList(): PsiModifierList = lightModifierList
@@ -101,14 +101,6 @@ abstract class KtUltraLightModifierList<out T : KtLightElement<KtModifierListOwn
}
}
class KtLightSimpleModifierList(
owner: KtLightElement<KtModifierListOwner, PsiModifierListOwner>, private val modifiers: Set<String>
) : KtLightModifierListDescriptorBased<KtLightElement<KtModifierListOwner, PsiModifierListOwner>>(owner) {
override fun hasModifierProperty(name: String) = name in modifiers
override fun copy() = KtLightSimpleModifierList(owner, modifiers)
}
private fun lightAnnotationsForEntries(lightModifierList: KtLightModifierList<*>): List<KtLightAnnotationForSourceEntry> {
val lightModifierListOwner = lightModifierList.parent