[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:
Pavel Yaskevich
2020-03-25 09:34:00 -07:00
parent 7410c09c56
commit 5f328ad003
3 changed files with 6 additions and 9 deletions

View File

@@ -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;
}