@@ -499,7 +499,7 @@ static bool accessIsConcurrencySafe(ModuleDecl *module,
499499
500500 // must be accessible from nonisolated and Sendable
501501 return isLetAccessibleAnywhere (module , var)
502- && isSendableType ( module , var->getTypeInContext ());
502+ && var->getTypeInContext ()-> isSendableType ( );
503503}
504504
505505// / \returns true iff the ref_element_addr instruction is only used
@@ -517,11 +517,10 @@ static bool onlyDeinitAccess(RefElementAddrInst *inst) {
517517// / diagnostic if it is not Sendable. The diagnostic assumes that the access
518518// / is happening in a deinit that uses flow-isolation.
519519// / \returns true iff a diagnostic was emitted for this reference.
520- static bool diagnoseNonSendableFromDeinit (ModuleDecl *module ,
521- RefElementAddrInst *inst) {
520+ static bool diagnoseNonSendableFromDeinit (RefElementAddrInst *inst) {
522521 VarDecl *var = inst->getField ();
523522 Type ty = var->getTypeInContext ();
524- DeclContext* dc = inst->getFunction ()->getDeclContext ();
523+ DeclContext * dc = inst->getFunction ()->getDeclContext ();
525524
526525// FIXME: we should emit diagnostics in other modes using:
527526//
@@ -534,7 +533,7 @@ static bool diagnoseNonSendableFromDeinit(ModuleDecl *module,
534533 != StrictConcurrency::Complete)
535534 return false ;
536535
537- if (isSendableType (module , ty ))
536+ if (ty-> isSendableType ())
538537 return false ;
539538
540539 auto &diag = var->getASTContext ().Diags ;
@@ -657,7 +656,7 @@ void AnalysisInfo::analyze(const SILArgument *selfParam) {
657656 continue ;
658657
659658 // emit a diagnostic and skip if it's non-sendable in a deinit
660- if (forDeinit && diagnoseNonSendableFromDeinit (module , refInst))
659+ if (forDeinit && diagnoseNonSendableFromDeinit (refInst))
661660 continue ;
662661
663662 markPropertyUse (user);
0 commit comments