Skip to content

Commit d035645

Browse files
committed
j2k: minor fixes in KtLightClassForAnonymousDeclaration
1 parent dfa2863 commit d035645

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

compiler/light-classes/src/org/jetbrains/kotlin/asJava/KtLightClassForAnonymousDeclaration.kt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@
1717
package org.jetbrains.kotlin.asJava
1818

1919
import com.intellij.openapi.diagnostic.Logger
20-
import com.intellij.openapi.project.Project
2120
import com.intellij.psi.*
2221
import com.intellij.psi.search.GlobalSearchScope
2322
import com.intellij.reference.SoftReference
24-
import org.jetbrains.kotlin.descriptors.ClassDescriptor
25-
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
2623
import org.jetbrains.kotlin.name.FqName
2724
import org.jetbrains.kotlin.psi.KtClassOrObject
2825
import org.jetbrains.kotlin.resolve.DescriptorUtils
29-
import org.jetbrains.kotlin.types.KotlinType
3026

31-
internal open class KtLightClassForAnonymousDeclaration(name: FqName, classOrObject: KtClassOrObject) : KtLightClassForExplicitDeclaration(name, classOrObject), PsiAnonymousClass {
27+
internal open class KtLightClassForAnonymousDeclaration(name: FqName,
28+
classOrObject: KtClassOrObject) :
29+
KtLightClassForExplicitDeclaration(name, classOrObject), PsiAnonymousClass {
3230

3331
private var cachedBaseType: SoftReference<PsiClassType>? = null
3432

@@ -40,8 +38,7 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName, classOrObj
4038
return delegate.containingClass
4139
}
4240

43-
private // return java.lang.Object for recovery
44-
val firstSupertypeFQName: String
41+
private val firstSupertypeFQName: String
4542
get() {
4643
val descriptor = getDescriptor() ?: return CommonClassNames.JAVA_LANG_OBJECT
4744

@@ -54,6 +51,8 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName, classOrObj
5451

5552
if (superClassDescriptor == null) {
5653
LOG.error("No declaration descriptor for supertype " + superType + " of " + getDescriptor())
54+
55+
// return java.lang.Object for recovery
5756
return CommonClassNames.JAVA_LANG_OBJECT
5857
}
5958

@@ -83,9 +82,7 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName, classOrObj
8382
return type
8483
}
8584

86-
override fun getArgumentList(): PsiExpressionList? {
87-
return null
88-
}
85+
override fun getArgumentList(): PsiExpressionList? = null
8986

9087
override fun isInQualifiedNew(): Boolean {
9188
return false

0 commit comments

Comments
 (0)