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
@@ -37,7 +37,7 @@ fun KtFunctionLiteral.findLabelAndCall(): Pair<Name?, KtCallExpression?> {
when (literalParent) {
is KtLabeledExpression -> {
val callExpression = (literalParent.getParent() as? KtValueArgument)?.callExpression()
val callExpression = (literalParent.parent as? KtValueArgument)?.callExpression()
return Pair(literalParent.getLabelNameAsName(), callExpression)
}
@@ -598,7 +598,7 @@ class KotlinPsiUnifier(
}
fun getDelegationOrderInfo(cls: KtClassOrObject): OrderInfo<KtSuperTypeListEntry> {
val (orderInsensitive, orderSensitive) = cls.getSuperTypeListEntries().partition { it is KtSuperTypeEntry }
val (orderInsensitive, orderSensitive) = cls.superTypeListEntries.partition { it is KtSuperTypeEntry }
return OrderInfo(orderSensitive, orderInsensitive)
}
@@ -539,7 +539,7 @@ class PartialBodyResolveFilter(
is KtBlockExpression -> expression == parent.lastStatement() && isValueNeeded(parent)
is KtContainerNode -> { //TODO - not quite correct
val pparent = parent.getParent() as? KtExpression
val pparent = parent.parent as? KtExpression
pparent != null && isValueNeeded(pparent)
}
@@ -559,7 +559,7 @@ class PartialBodyResolveFilter(
private fun KtBlockExpression.lastStatement(): KtExpression?
= lastChild?.siblings(forward = false)?.firstIsInstanceOrNull<KtExpression>()
private fun PsiElement.isStatement() = this is KtExpression && getParent() is KtBlockExpression
private fun PsiElement.isStatement() = this is KtExpression && parent is KtBlockExpression
private fun KtTypeReference?.containsProbablyNothing()
= this?.typeElement?.anyDescendantOfType<KtUserType> { it.isProbablyNothing() } ?: false