[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
@@ -580,10 +580,8 @@ internal object CheckLowPriorityInOverloadResolution : CheckerStage() {
internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionStage() {
override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) =
with(candidate.system.asConstraintSystemCompleterContext()) {
val typeVariables = candidate.system.notFixedTypeVariables.values.takeIf { it.isNotEmpty() } ?: return
for (variableWithConstraints in typeVariables) {
val upperTypes = variableWithConstraints.constraints.extractUpperTypes()
for (variableWithConstraints in candidate.system.notFixedTypeVariables.values) {
val upperTypes = variableWithConstraints.constraints.extractUpperTypesToCheckIntersectionEmptiness()
if (upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty()) {
sink.yieldDiagnostic(