Skip to content

Commit 55e8d55

Browse files
committed
Change how to check null
1 parent c0e82ec commit 55e8d55

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Sema/TypeCheckConcurrency.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,8 @@ bool diagnoseNonSendableTypesWithSendingCheck(
459459
return false;
460460
}
461461
if (auto *subscript = dyn_cast<SubscriptDecl>(decl)) {
462-
if (auto resultTypeRepr = subscript->getResultTypeRepr())
463-
if (isa<SendingTypeRepr>(resultTypeRepr))
464-
return false;
462+
if (isa_and_nonnull<SendingTypeRepr>(subscript->getResultTypeRepr()))
463+
return false;
465464
}
466465

467466
return diagnoseNonSendableTypes(

0 commit comments

Comments
 (0)