File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1714,8 +1714,7 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
1714
1714
1715
1715
if (Context.LangOpts .hasFeature (Feature::InferSendableFromCaptures)) {
1716
1716
// All global functions should be @Sendable
1717
- if (!funcDecl->getDeclContext ()->isTypeContext () &&
1718
- !funcDecl->getDeclContext ()->isLocalContext ()) {
1717
+ if (funcDecl->getDeclContext ()->isModuleScopeContext ()) {
1719
1718
funcType =
1720
1719
funcType->withExtInfo (funcType->getExtInfo ().withConcurrent ());
1721
1720
}
@@ -1740,7 +1739,8 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
1740
1739
if (isForCodeCompletion () && openedType->hasError ()) {
1741
1740
// In code completion, replace error types by placeholder types so we can
1742
1741
// match the types we know instead of bailing out completely.
1743
- openedType = replaceParamErrorTypeByPlaceholder (openedType, value, /* hasAppliedSelf=*/ true );
1742
+ openedType = replaceParamErrorTypeByPlaceholder (
1743
+ openedType, value, /* hasAppliedSelf=*/ true );
1744
1744
}
1745
1745
1746
1746
// If we opened up any type variables, record the replacements.
You can’t perform that action at this time.
0 commit comments