Discourage constraint systems that use more unchecked forces.

This is in preparation for a change that allows unchecked-optional
values to be implicitly forced in all contexts.

Swift SVN r14704
This commit is contained in:
John McCall
2014-03-06 00:18:41 +00:00
parent 2aa197f636
commit e38a2b9a08
2 changed files with 4 additions and 1 deletions

View File

@@ -1360,6 +1360,7 @@ ConstraintSystem::simplifyMemberConstraint(const Constraint &constraint) {
// Try to look through UncheckedOptional<T>; the result is always an r-value.
if (auto objTy = lookThroughUncheckedOptionalType(baseObjTy)) {
increaseScore(SK_UncheckedForce);
baseTy = baseObjTy = objTy;
}