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 @@ -1823,8 +1823,7 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
18231823
18241824 if (Context.LangOpts .hasFeature (Feature::InferSendableFromCaptures)) {
18251825 // All global functions should be @Sendable
1826- if (!funcDecl->getDeclContext ()->isTypeContext () &&
1827- !funcDecl->getDeclContext ()->isLocalContext ()) {
1826+ if (funcDecl->getDeclContext ()->isModuleScopeContext ()) {
18281827 funcType =
18291828 funcType->withExtInfo (funcType->getExtInfo ().withConcurrent ());
18301829 }
@@ -1849,7 +1848,8 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
18491848 if (isForCodeCompletion () && openedType->hasError ()) {
18501849 // In code completion, replace error types by placeholder types so we can
18511850 // match the types we know instead of bailing out completely.
1852- openedType = replaceParamErrorTypeByPlaceholder (openedType, value, /* hasAppliedSelf=*/ true );
1851+ openedType = replaceParamErrorTypeByPlaceholder (
1852+ openedType, value, /* hasAppliedSelf=*/ true );
18531853 }
18541854
18551855 // If we opened up any type variables, record the replacements.
You can’t perform that action at this time.
0 commit comments