Remove constraints containing stub types after completion of the common system of a builder inference call
^KT-49285 Fixed
This commit is contained in:
+2
@@ -19,6 +19,8 @@ interface PostponedArgumentsAnalyzerContext : TypeSystemInferenceExtensionContex
|
||||
|
||||
fun hasUpperOrEqualUnitConstraint(type: KotlinTypeMarker): Boolean
|
||||
|
||||
fun removePostponedTypeVariablesFromConstraints(postponedTypeVariables: Set<TypeConstructorMarker>)
|
||||
|
||||
// mutable operations
|
||||
fun addOtherSystem(otherSystem: ConstraintStorage)
|
||||
|
||||
|
||||
+8
@@ -531,4 +531,12 @@ class NewConstraintSystemImpl(
|
||||
it.type.lowerBoundIfFlexible().isUnit()
|
||||
}
|
||||
}
|
||||
|
||||
override fun removePostponedTypeVariablesFromConstraints(postponedTypeVariables: Set<TypeConstructorMarker>) {
|
||||
for ((_, variableWithConstraints) in storage.notFixedTypeVariables) {
|
||||
variableWithConstraints.removeConstrains { constraint ->
|
||||
constraint.type.contains { it is StubTypeMarker && it.getOriginalTypeVariable() in postponedTypeVariables }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user