Cleanup: apply "Use synthetic property access syntax"

This commit is contained in:
Mikhail Glukhikh
2017-02-17 15:39:05 +03:00
parent 1375267996
commit d0cc1635db
163 changed files with 344 additions and 344 deletions
@@ -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 {
@@ -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()
}
@@ -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) } }