mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] Allow conformances with no witness if allowing errors
Note that deserialization already handles this case when recovery is enabled.
This commit is contained in:
@@ -1460,7 +1460,8 @@ void Serializer::writeASTBlockEntity(
|
||||
data.push_back(addDeclRef(req));
|
||||
data.push_back(addDeclRef(witness.getDecl()));
|
||||
assert(witness.getDecl() || req->getAttrs().hasAttribute<OptionalAttr>()
|
||||
|| req->getAttrs().isUnavailable(req->getASTContext()));
|
||||
|| req->getAttrs().isUnavailable(req->getASTContext())
|
||||
|| allowCompilerErrors());
|
||||
|
||||
// If there is no witness, we're done.
|
||||
if (!witness.getDecl()) return;
|
||||
|
||||
Reference in New Issue
Block a user