Remove constraints containing stub types after completion of the common system of a builder inference call

^KT-49285 Fixed
This commit is contained in:
Victor Petukhov
2021-10-19 14:07:54 +03:00
parent 012f1f6013
commit 64c682f465
14 changed files with 89 additions and 0 deletions
@@ -129,6 +129,11 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext, ConeTypeCo
return this.isExtensionFunctionType
}
override fun StubTypeMarker.getOriginalTypeVariable(): TypeVariableTypeConstructorMarker {
require(this is ConeStubType)
return this.variable.typeConstructor
}
override fun KotlinTypeMarker.typeDepth() = when (this) {
is ConeSimpleKotlinType -> typeDepth()
is ConeFlexibleType -> maxOf(lowerBound().typeDepth(), upperBound().typeDepth())