Implement copy methods for anonymous and enum entry light classes

This commit is contained in:
Nikolay Krasko
2016-06-15 15:48:50 +03:00
parent 29b94f650c
commit 784fd963cd
2 changed files with 3 additions and 0 deletions
@@ -111,6 +111,8 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName,
override fun getTypeParameterList() = null
override fun isEnum() = false
override fun copy(): PsiElement = KtLightClassForAnonymousDeclaration(classFqName, classOrObject)
companion object {
private val LOG = Logger.getInstance(KtLightClassForAnonymousDeclaration::class.java)
}
@@ -27,4 +27,5 @@ internal class KtLightClassForEnumEntry(
private val enumConstant: PsiEnumConstant
): KtLightClassForAnonymousDeclaration(fqName, enumEntry), PsiEnumConstantInitializer {
override fun getEnumConstant(): PsiEnumConstant = enumConstant
override fun copy() = KtLightClassForEnumEntry(classFqName, classOrObject as KtEnumEntry, enumConstant)
}