Implement copy methods for anonymous and enum entry light classes
This commit is contained in:
+2
@@ -111,6 +111,8 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName,
|
|||||||
override fun getTypeParameterList() = null
|
override fun getTypeParameterList() = null
|
||||||
override fun isEnum() = false
|
override fun isEnum() = false
|
||||||
|
|
||||||
|
override fun copy(): PsiElement = KtLightClassForAnonymousDeclaration(classFqName, classOrObject)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val LOG = Logger.getInstance(KtLightClassForAnonymousDeclaration::class.java)
|
private val LOG = Logger.getInstance(KtLightClassForAnonymousDeclaration::class.java)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,4 +27,5 @@ internal class KtLightClassForEnumEntry(
|
|||||||
private val enumConstant: PsiEnumConstant
|
private val enumConstant: PsiEnumConstant
|
||||||
): KtLightClassForAnonymousDeclaration(fqName, enumEntry), PsiEnumConstantInitializer {
|
): KtLightClassForAnonymousDeclaration(fqName, enumEntry), PsiEnumConstantInitializer {
|
||||||
override fun getEnumConstant(): PsiEnumConstant = enumConstant
|
override fun getEnumConstant(): PsiEnumConstant = enumConstant
|
||||||
|
override fun copy() = KtLightClassForEnumEntry(classFqName, classOrObject as KtEnumEntry, enumConstant)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user