mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Don't increase SK_Fix score when looking through holes
`SK_Fix` was used to indicate that solver has encountered a hole along the current path but since there is `SK_Hole` now, increasing `SK_Fix` no longer makes sense.
This commit is contained in:
@@ -5073,7 +5073,6 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
|
||||
// func foo<T: BinaryInteger>(_: T) {}
|
||||
// foo(Foo.bar) <- if `Foo` doesn't have `bar` there is
|
||||
// no reason to complain about missing conformance.
|
||||
increaseScore(SK_Fix);
|
||||
return SolutionKind::Solved;
|
||||
}
|
||||
|
||||
@@ -6466,7 +6465,6 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
|
||||
baseObjTy->isHole()) {
|
||||
// If base type is a "hole" there is no reason to record any
|
||||
// more "member not found" fixes for chained member references.
|
||||
increaseScore(SK_Fix);
|
||||
markMemberTypeAsPotentialHole(memberTy);
|
||||
return SolutionKind::Solved;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user