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:
Ilya Gorbunov
2017-03-17 16:06:28 +03:00
parent e599688733
commit dce0da68c6
24 changed files with 43 additions and 48 deletions
@@ -42,8 +42,8 @@ internal fun nonProjectionParametrization(samType: SimpleType): SimpleType? {
projection.projectionKind == Variance.INVARIANT -> projection
projection.isStarProjection ->
parameter.upperBounds.first().takeIf {
t -> !t.contains { it.constructor.declarationDescriptor in parametersSet }
parameter.upperBounds.first().takeUnless {
t -> t.contains { it.constructor.declarationDescriptor in parametersSet }
}?.asTypeProjection() ?: return@nonProjectionParametrization null
else -> projection.type.asTypeProjection()