[Constraint solver] Remove 'type member' constraint.

Only some fallback code in the for-each binding checking code was
using this constraint. Implement those checks more directly.
This commit is contained in:
Doug Gregor
2016-11-06 22:52:03 -08:00
parent ed0955aa8e
commit e20464a02c
7 changed files with 10 additions and 145 deletions

View File

@@ -720,7 +720,6 @@ static bool shouldBindToValueType(Constraint *constraint)
case ConstraintKind::DynamicTypeOf:
case ConstraintKind::ValueMember:
case ConstraintKind::UnresolvedValueMember:
case ConstraintKind::TypeMember:
case ConstraintKind::Defaultable:
case ConstraintKind::Disjunction:
llvm_unreachable("shouldBindToValueType() may only be called on "
@@ -950,7 +949,6 @@ static PotentialBindings getPotentialBindings(ConstraintSystem &cs,
case ConstraintKind::ValueMember:
case ConstraintKind::UnresolvedValueMember:
case ConstraintKind::TypeMember:
// If our type variable shows up in the base type, there's
// nothing to do.
// FIXME: Can we avoid simplification here?