Cleanup: apply "Use synthetic property access syntax"
This commit is contained in:
@@ -64,7 +64,7 @@ class KotlinUClass private constructor(
|
||||
override fun getInitializers(): Array<UClassInitializer> = super.getInitializers()
|
||||
|
||||
override fun getMethods(): Array<UMethod> {
|
||||
val primaryConstructor = ktClass?.getPrimaryConstructor()?.toLightMethods()?.firstOrNull()
|
||||
val primaryConstructor = ktClass?.primaryConstructor?.toLightMethods()?.firstOrNull()
|
||||
val initBlocks = ktClass?.getAnonymousInitializers() ?: emptyList()
|
||||
|
||||
fun createUMethod(psiMethod: PsiMethod): UMethod {
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@ class KotlinUFunctionCallExpression(
|
||||
companion object {
|
||||
fun resolveSource(descriptor: DeclarationDescriptor, source: PsiElement?): PsiMethod? {
|
||||
if (descriptor is ConstructorDescriptor && descriptor.isPrimary
|
||||
&& source is KtClassOrObject && source.getPrimaryConstructor() == null
|
||||
&& source.getSecondaryConstructors().isEmpty()) {
|
||||
&& source is KtClassOrObject && source.primaryConstructor == null
|
||||
&& source.secondaryConstructors.isEmpty()) {
|
||||
return source.toLightClass()?.constructors?.firstOrNull()
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ class KotlinUObjectLiteralExpression(
|
||||
override fun getExpressionType() = psi.objectDeclaration.toPsiType()
|
||||
|
||||
private val superClassConstructorCall by lz {
|
||||
psi.objectDeclaration.getSuperTypeListEntries().firstOrNull { it is KtSuperTypeCallEntry } as? KtSuperTypeCallEntry
|
||||
psi.objectDeclaration.superTypeListEntries.firstOrNull { it is KtSuperTypeCallEntry } as? KtSuperTypeCallEntry
|
||||
}
|
||||
|
||||
override val classReference: UReferenceExpression? by lz { superClassConstructorCall?.let { ObjectLiteralClassReference(it, this) } }
|
||||
|
||||
Reference in New Issue
Block a user