mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CSBindings] Reset literal coverage when retracting constraint
This commit is contained in:
@@ -206,6 +206,11 @@ struct LiteralRequirement {
|
||||
bool canBeNil,
|
||||
DeclContext *useDC) const;
|
||||
|
||||
void resetCoverage() {
|
||||
assert(isCovered() && "literal requirement is uncovered");
|
||||
CoveredBy = nullptr;
|
||||
}
|
||||
|
||||
/// Determines whether literal protocol associated with this
|
||||
/// meta-information is viable for inclusion as a defaultable binding.
|
||||
bool viableAsBinding() const { return !isCovered() && hasDefaultType(); }
|
||||
|
||||
Reference in New Issue
Block a user