ConeSimpleKotlinType: introduce & use unwrapDefinitelyNotNull

This commit is contained in:
Mikhail Glukhikh
2022-02-03 15:52:35 +03:00
committed by TeamCityServer
parent d1194e5fd2
commit 27d4c745cb
3 changed files with 14 additions and 5 deletions
@@ -175,6 +175,13 @@ fun ConeKotlinType.lowerBoundIfFlexible(): ConeSimpleKotlinType {
}
}
fun ConeSimpleKotlinType.unwrapDefinitelyNotNull(): ConeSimpleKotlinType {
return when (this) {
is ConeDefinitelyNotNullType -> original
else -> this
}
}
class ConeCapturedTypeConstructor(
val projection: ConeTypeProjection,
var supertypes: List<ConeKotlinType>? = null,