Skip to content

Commit 287ee75

Browse files
committed
NFC: [BitwiseCopyable] Asserted condition.
The protocol is always defined here, so assert that it is.
1 parent b8cd7ef commit 287ee75

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/Sema/TypeCheckBitwise.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,8 @@ void BitwiseCopyableStorageVisitor::emitNonconformingMemberTypeDiagnostic(
219219
static bool checkBitwiseCopyableInstanceStorage(NominalTypeDecl *nominal,
220220
DeclContext *dc,
221221
BitwiseCopyableCheck check) {
222-
// If the BitwiseCopyable protocol doesn't exist, there's nothing to do.
223-
if (!dc->getParentModule()->getASTContext().getProtocol(
224-
KnownProtocolKind::BitwiseCopyable))
225-
return false;
222+
assert(dc->getParentModule()->getASTContext().getProtocol(
223+
KnownProtocolKind::BitwiseCopyable));
226224

227225
if (isa<ClassDecl>(nominal)) {
228226
if (!isImplicit(check)) {

0 commit comments

Comments
 (0)