[FE 1.0] Introduce deprecation of inferred type variable into a declared upper bound within a builder inference call

This commit is contained in:
Victor Petukhov
2022-05-31 13:42:35 +02:00
committed by teamcity
parent 848075192c
commit b472ccd358
31 changed files with 300 additions and 35 deletions
@@ -24,8 +24,11 @@ abstract class InjectedAnotherStubTypeConstraintPosition<T>(private val builderI
override fun toString(): String = "Injected from $builderInferenceLambdaOfInjectedStubType builder inference call"
}
abstract class BuilderInferenceSubstitutionConstraintPosition<L, I>(private val builderInferenceLambda: L, val initialConstraint: I) :
ConstraintPosition(), OnlyInputTypeConstraintPosition {
abstract class BuilderInferenceSubstitutionConstraintPosition<L, I>(
private val builderInferenceLambda: L,
val initialConstraint: I,
val isFromNotSubstitutedDeclaredUpperBound: Boolean = false
) : ConstraintPosition(), OnlyInputTypeConstraintPosition {
override fun toString(): String = "Incorporated builder inference constraint $initialConstraint " +
"into $builderInferenceLambda call"
}
@@ -128,6 +131,8 @@ open class NotEnoughInformationForTypeParameter<T>(
val couldBeResolvedWithUnrestrictedBuilderInference: Boolean
) : ConstraintSystemError(INAPPLICABLE)
class InferredIntoDeclaredUpperBounds(val typeVariable: TypeVariableMarker) : ConstraintSystemError(RESOLVED)
class ConstrainingTypeIsError(
val typeVariable: TypeVariableMarker,
val constraintType: KotlinTypeMarker,