[Serialization] Remove an assertion that fires spuriously.

This assertion does not account for the fact that a particular
requirement can be imported both as async and with a completion
handler, and therefore one of those two views won't have a witness.
The assertion is no longer catching anything useful, so remove it.

Addresses rdar://77684000.
This commit is contained in:
Doug Gregor
2021-09-10 21:04:07 -07:00
parent 4164b2e56c
commit 04135a3db6

View File

@@ -1490,9 +1490,6 @@ void Serializer::writeASTBlockEntity(
++numValueWitnesses;
data.push_back(addDeclRef(req));
data.push_back(addDeclRef(witness.getDecl()));
assert(witness.getDecl() || req->getAttrs().hasAttribute<OptionalAttr>()
|| req->getAttrs().isUnavailable(req->getASTContext())
|| allowCompilerErrors());
// If there is no witness, we're done.
if (!witness.getDecl()) return;