Cleanup: apply "Use synthetic property access syntax"
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user