[FE] Substitute fixed type variables with inferred stub types
Actually, a type variable might be fixed into a stub type. Such stub type should be substituted before sub calls completion ^KT-51988 Fixed
This commit is contained in:
committed by
teamcity
parent
92df5cd67f
commit
6027c2a9aa
+1
@@ -18,6 +18,7 @@ interface ConstraintSystemOperation {
|
||||
fun markCouldBeResolvedWithUnrestrictedBuilderInference()
|
||||
fun unmarkPostponedVariable(variable: TypeVariableMarker)
|
||||
fun removePostponedVariables()
|
||||
fun substituteFixedVariables(substitutor: TypeSubstitutorMarker)
|
||||
|
||||
fun getBuiltFunctionalExpectedTypeForPostponedArgument(
|
||||
topLevelVariable: TypeConstructorMarker,
|
||||
|
||||
+4
@@ -144,6 +144,10 @@ class NewConstraintSystemImpl(
|
||||
storage.postponedTypeVariables.clear()
|
||||
}
|
||||
|
||||
override fun substituteFixedVariables(substitutor: TypeSubstitutorMarker) {
|
||||
storage.fixedTypeVariables.replaceAll { _, type -> substitutor.safeSubstitute(type) }
|
||||
}
|
||||
|
||||
override fun putBuiltFunctionalExpectedTypeForPostponedArgument(
|
||||
topLevelVariable: TypeConstructorMarker,
|
||||
pathToExpectedType: List<Pair<TypeConstructorMarker, Int>>,
|
||||
|
||||
Reference in New Issue
Block a user