17
17
package org.jetbrains.kotlin.asJava
18
18
19
19
import com.intellij.openapi.diagnostic.Logger
20
- import com.intellij.openapi.project.Project
21
20
import com.intellij.psi.*
22
21
import com.intellij.psi.search.GlobalSearchScope
23
22
import com.intellij.reference.SoftReference
24
- import org.jetbrains.kotlin.descriptors.ClassDescriptor
25
- import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
26
23
import org.jetbrains.kotlin.name.FqName
27
24
import org.jetbrains.kotlin.psi.KtClassOrObject
28
25
import org.jetbrains.kotlin.resolve.DescriptorUtils
29
- import org.jetbrains.kotlin.types.KotlinType
30
26
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 {
32
30
33
31
private var cachedBaseType: SoftReference <PsiClassType >? = null
34
32
@@ -40,8 +38,7 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName, classOrObj
40
38
return delegate.containingClass
41
39
}
42
40
43
- private // return java.lang.Object for recovery
44
- val firstSupertypeFQName: String
41
+ private val firstSupertypeFQName: String
45
42
get() {
46
43
val descriptor = getDescriptor() ? : return CommonClassNames .JAVA_LANG_OBJECT
47
44
@@ -54,6 +51,8 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName, classOrObj
54
51
55
52
if (superClassDescriptor == null ) {
56
53
LOG .error(" No declaration descriptor for supertype " + superType + " of " + getDescriptor())
54
+
55
+ // return java.lang.Object for recovery
57
56
return CommonClassNames .JAVA_LANG_OBJECT
58
57
}
59
58
@@ -83,9 +82,7 @@ internal open class KtLightClassForAnonymousDeclaration(name: FqName, classOrObj
83
82
return type
84
83
}
85
84
86
- override fun getArgumentList (): PsiExpressionList ? {
87
- return null
88
- }
85
+ override fun getArgumentList (): PsiExpressionList ? = null
89
86
90
87
override fun isInQualifiedNew (): Boolean {
91
88
return false
0 commit comments