[FIR] Add requirement to checkUpperBoundViolated function

This commit is contained in:
Roman Golyshev
2021-10-04 15:28:39 +03:00
committed by Space
parent 337cbeded1
commit 8673819260
@@ -33,6 +33,10 @@ fun checkUpperBoundViolated(
isTypeAlias: Boolean = false,
isIgnoreTypeParameters: Boolean = false
) {
require(typeArguments == null || typeArgumentRefsAndSources == null) {
"Only one of those arguments can be not null"
}
val type = typeRef?.coneTypeSafe<ConeKotlinType>() ?: return
val typeArgumentsCount = typeArguments?.size ?: type.typeArguments.size