Cleanup: post-cleanup after deprecation cleanup in compiler
Replace `takeIf { !expr }` with `takeUnless { expr }`.
Cleanup redundant parethesis as in `listOf((expr))`.
Replace `listOf(expr)` with `expr.let(::listOf)` where the former caused significant indentation change.
This commit is contained in:
@@ -588,7 +588,7 @@ class ExpectedInfos(
|
||||
|
||||
val loopVar = forExpression.loopParameter
|
||||
val loopVarType = if (loopVar != null && loopVar.typeReference != null)
|
||||
(bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, loopVar] as VariableDescriptor).type.takeIf { !it.isError }
|
||||
(bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, loopVar] as VariableDescriptor).type.takeUnless { it.isError }
|
||||
else
|
||||
null
|
||||
|
||||
|
||||
@@ -478,7 +478,7 @@ class KotlinIndicesHelper(
|
||||
val translatedDeclaration = declarationTranslator(this) ?: return emptyList()
|
||||
if (!psiFilter(translatedDeclaration)) return emptyList()
|
||||
|
||||
return listOfNotNull((resolutionFacade.resolveToDescriptor(translatedDeclaration)))
|
||||
return listOfNotNull(resolutionFacade.resolveToDescriptor(translatedDeclaration))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user