@@ -22,7 +22,7 @@ using namespace swift;
22
22
using namespace constraints ;
23
23
24
24
void ConstraintSystem::PotentialBindings::inferTransitiveBindings (
25
- const ConstraintSystem &cs, llvm::SmallPtrSetImpl<CanType> &existingTypes,
25
+ ConstraintSystem &cs, llvm::SmallPtrSetImpl<CanType> &existingTypes,
26
26
const llvm::SmallDenseMap<TypeVariableType *,
27
27
ConstraintSystem::PotentialBindings>
28
28
&inferredBindings) {
@@ -144,7 +144,7 @@ isUnviableDefaultType(Type defaultType,
144
144
}
145
145
146
146
void ConstraintSystem::PotentialBindings::inferDefaultTypes (
147
- const ConstraintSystem &cs, llvm::SmallPtrSetImpl<CanType> &existingTypes) {
147
+ ConstraintSystem &cs, llvm::SmallPtrSetImpl<CanType> &existingTypes) {
148
148
auto isDirectRequirement = [&](Constraint *constraint) -> bool {
149
149
if (auto *typeVar = constraint->getFirstType ()->getAs <TypeVariableType>()) {
150
150
auto *repr = cs.getRepresentative (typeVar);
@@ -300,7 +300,7 @@ void ConstraintSystem::PotentialBindings::inferDefaultTypes(
300
300
}
301
301
302
302
void ConstraintSystem::PotentialBindings::finalize (
303
- const ConstraintSystem &cs,
303
+ ConstraintSystem &cs,
304
304
const llvm::SmallDenseMap<TypeVariableType *,
305
305
ConstraintSystem::PotentialBindings>
306
306
&inferredBindings) {
@@ -620,8 +620,7 @@ bool ConstraintSystem::PotentialBindings::favoredOverDisjunction(
620
620
}
621
621
622
622
ConstraintSystem::PotentialBindings
623
- ConstraintSystem::inferBindingsFor (TypeVariableType *typeVar,
624
- bool finalize) const {
623
+ ConstraintSystem::inferBindingsFor (TypeVariableType *typeVar, bool finalize) {
625
624
assert (typeVar->getImpl ().getRepresentative (nullptr ) == typeVar &&
626
625
" not a representative" );
627
626
assert (!typeVar->getImpl ().getFixedType (nullptr ) && " has a fixed type" );
@@ -829,7 +828,7 @@ ConstraintSystem::getPotentialBindingForRelationalConstraint(
829
828
// / representative type variable, along with flags indicating whether
830
829
// / those types should be opened.
831
830
bool ConstraintSystem::PotentialBindings::infer (
832
- const ConstraintSystem &cs, llvm::SmallPtrSetImpl<CanType> &exactTypes,
831
+ ConstraintSystem &cs, llvm::SmallPtrSetImpl<CanType> &exactTypes,
833
832
Constraint *constraint) {
834
833
switch (constraint->getKind ()) {
835
834
case ConstraintKind::Bind:
0 commit comments