[FE 1.0] Don't fail candidates which were marked with compatibility resolve previously
^KT-52431 Fixed ^KT-52393 Fixed
This commit is contained in:
committed by
teamcity
parent
73d676d9de
commit
02a430875f
@@ -581,10 +581,10 @@ internal object CheckIncompatibleTypeVariableUpperBounds : ResolutionStage() {
|
||||
val upperTypes = variableWithConstraints.constraints.extractUpperTypesToCheckIntersectionEmptiness()
|
||||
|
||||
// TODO: consider reporting errors on bounded type variables by incompatible types but with other lower constraints
|
||||
if (
|
||||
variableWithConstraints.constraints.none { it.kind.isLower() }
|
||||
&& upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty()
|
||||
) {
|
||||
if (upperTypes.size <= 1 || variableWithConstraints.constraints.any { it.kind.isLower() })
|
||||
continue
|
||||
|
||||
if (upperTypes.computeEmptyIntersectionTypeKind().isDefinitelyEmpty()) {
|
||||
sink.yieldDiagnostic(
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
InferredEmptyIntersectionDiagnostic(
|
||||
|
||||
Reference in New Issue
Block a user