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 {
206
206
bool canBeNil,
207
207
DeclContext *useDC) const ;
208
208
209
+ void resetCoverage () {
210
+ assert (isCovered () && " literal requirement is uncovered" );
211
+ CoveredBy = nullptr ;
212
+ }
213
+
209
214
// / Determines whether literal protocol associated with this
210
215
// / meta-information is viable for inclusion as a defaultable binding.
211
216
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) {
1298
1298
AdjacentVars.erase (std::make_pair (adjacentVar, constraint));
1299
1299
}
1300
1300
1301
+ for (auto &literal : Literals) {
1302
+ if (literal.second .CoveredBy == constraint)
1303
+ literal.second .resetCoverage ();
1304
+ }
1305
+
1301
1306
DelayedBy.erase (llvm::remove_if (DelayedBy, isMatchingConstraint),
1302
1307
DelayedBy.end ());
1303
1308
You can’t perform that action at this time.
0 commit comments