NCGenerics: improve assertion messages

This commit is contained in:
Kavon Farvardin
2024-01-26 16:51:15 -08:00
parent bd3c15e64d
commit 00b2168bc4
4 changed files with 7 additions and 8 deletions

View File

@@ -4897,7 +4897,7 @@ InverseMarking TypeDecl::getMarking(InvertibleProtocolKind ip) const {
static TypeDecl::CanBeInvertible::Result
conformanceExists(TypeDecl const *decl, InvertibleProtocolKind ip) {
auto *proto = decl->getASTContext().getProtocol(getKnownProtocolKind(ip));
assert(proto);
assert(proto && "missing Copyable/Escapable from stdlib!");
// Handle protocols specially, without building a GenericSignature.
if (auto *protoDecl = dyn_cast<ProtocolDecl>(decl))