LC: use lazyPub to initialize identifier of parameter
This commit is contained in:
committed by
Ilya Kirillov
parent
815d1ad54b
commit
ef94582059
+4
-7
@@ -37,7 +37,9 @@ internal class KtLightParameterImpl(
|
|||||||
|
|
||||||
private val lightModifierList by lazyPub { KtLightSimpleModifierList(this, emptySet()) }
|
private val lightModifierList by lazyPub { KtLightSimpleModifierList(this, emptySet()) }
|
||||||
|
|
||||||
private var lightIdentifier: KtLightIdentifier? = null
|
private val lightIdentifier: KtLightIdentifier? by lazyPub {
|
||||||
|
KtLightIdentifier(this, kotlinOrigin)
|
||||||
|
}
|
||||||
|
|
||||||
override val kotlinOrigin: KtParameter?
|
override val kotlinOrigin: KtParameter?
|
||||||
get() {
|
get() {
|
||||||
@@ -87,12 +89,7 @@ internal class KtLightParameterImpl(
|
|||||||
|
|
||||||
override fun getTextRange(): TextRange = kotlinOrigin?.textRange ?: TextRange.EMPTY_RANGE
|
override fun getTextRange(): TextRange = kotlinOrigin?.textRange ?: TextRange.EMPTY_RANGE
|
||||||
|
|
||||||
override fun getNameIdentifier(): PsiIdentifier? {
|
override fun getNameIdentifier(): PsiIdentifier? = lightIdentifier
|
||||||
if (lightIdentifier == null) {
|
|
||||||
lightIdentifier = KtLightIdentifier(this, kotlinOrigin)
|
|
||||||
}
|
|
||||||
return lightIdentifier
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getParent(): PsiElement = method.parameterList
|
override fun getParent(): PsiElement = method.parameterList
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user