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
@@ -291,9 +291,9 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
require(this is SimpleType, this::errorMessage)
if (this is TypeUtils.SpecialType) return 0
val maxInArguments = arguments.asSequence().map {
val maxInArguments = arguments.maxOfOrNull {
if (it.isStarProjection) 1 else it.type.unwrap().typeDepth()
}.max() ?: 0
} ?: 0
return maxInArguments + 1
}