Replace deprecated usages of max/min with maxOrNull/minOrNull

This commit is contained in:
Alexander Udalov
2020-08-13 18:14:02 +02:00
parent 81dda96ece
commit a9ddf02556
48 changed files with 86 additions and 84 deletions
@@ -250,9 +250,9 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
}
override fun SimpleTypeMarker.typeDepth(): Int {
val maxInArguments = (this as IrSimpleType).arguments.asSequence().map {
val maxInArguments = (this as IrSimpleType).arguments.maxOfOrNull {
if (it is IrStarProjection) 1 else it.getType().typeDepth()
}.max() ?: 0
} ?: 0
return maxInArguments + 1
}