File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,11 @@ struct LiteralRequirement {
206206 bool canBeNil,
207207 DeclContext *useDC) const ;
208208
209+ void resetCoverage () {
210+ assert (isCovered () && " literal requirement is uncovered" );
211+ CoveredBy = nullptr ;
212+ }
213+
209214 // / Determines whether literal protocol associated with this
210215 // / meta-information is viable for inclusion as a defaultable binding.
211216 bool viableAsBinding () const { return !isCovered () && hasDefaultType (); }
Original file line number Diff line number Diff line change @@ -1298,6 +1298,11 @@ void PotentialBindings::retract(Constraint *constraint) {
12981298 AdjacentVars.erase (std::make_pair (adjacentVar, constraint));
12991299 }
13001300
1301+ for (auto &literal : Literals) {
1302+ if (literal.second .CoveredBy == constraint)
1303+ literal.second .resetCoverage ();
1304+ }
1305+
13011306 DelayedBy.erase (llvm::remove_if (DelayedBy, isMatchingConstraint),
13021307 DelayedBy.end ());
13031308
You can’t perform that action at this time.
0 commit comments