mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -1336,32 +1336,6 @@ public:
|
||||
resolveOverload(locator, boundTy, choice);
|
||||
}
|
||||
|
||||
/// \brief Add a value member constraint to the constraint system.
|
||||
void addTypeMemberConstraint(Type baseTy, DeclName name, Type memberTy,
|
||||
ConstraintLocatorBuilder locator) {
|
||||
assert(baseTy);
|
||||
assert(memberTy);
|
||||
assert(name);
|
||||
switch (simplifyMemberConstraint(ConstraintKind::TypeMember, baseTy, name,
|
||||
memberTy, FunctionRefKind::Compound,
|
||||
TMF_GenerateConstraints, locator)) {
|
||||
case SolutionKind::Unsolved:
|
||||
llvm_unreachable("Unsolved result when generating constraints!");
|
||||
|
||||
case SolutionKind::Solved:
|
||||
break;
|
||||
|
||||
case SolutionKind::Error:
|
||||
if (shouldAddNewFailingConstraint()) {
|
||||
addNewFailingConstraint(
|
||||
Constraint::create(*this, ConstraintKind::TypeMember, baseTy,
|
||||
memberTy, name, FunctionRefKind::Compound,
|
||||
getConstraintLocator(locator)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// \brief Add a value member constraint to the constraint system.
|
||||
void addValueMemberConstraint(Type baseTy, DeclName name, Type memberTy,
|
||||
FunctionRefKind functionRefKind,
|
||||
|
||||
Reference in New Issue
Block a user