[FE] Review fixes

This commit is contained in:
Victor Petukhov
2022-04-18 12:07:27 +03:00
committed by teamcity
parent c71ae4301c
commit e0a1f1c405
24 changed files with 60 additions and 75 deletions
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.types.error.ErrorUtils
import org.jetbrains.kotlin.types.model.*
import org.jetbrains.kotlin.types.typeUtil.*
import org.jetbrains.kotlin.utils.SmartList
import org.jetbrains.kotlin.utils.addToStdlib.cast
import org.jetbrains.kotlin.utils.addToStdlib.compactIfPossible
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
@@ -882,10 +881,8 @@ internal object CheckContextReceiversResolutionPart : ResolutionPart() {
internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionPart() {
override fun ResolutionCandidate.process(workIndex: Int) = with(getSystem().asConstraintSystemCompleterContext()) {
val typeVariables = getSystem().getBuilder().currentStorage().notFixedTypeVariables.values.takeIf { it.isNotEmpty() } ?: return
for (variableWithConstraints in typeVariables) {
val upperTypes = variableWithConstraints.constraints.extractUpperTypes()
for (variableWithConstraints in getSystem().getBuilder().currentStorage().notFixedTypeVariables.values) {
val upperTypes = variableWithConstraints.constraints.extractUpperTypesToCheckIntersectionEmptiness()
if (upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty()) {
val isInferredEmptyIntersectionForbidden =