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,
1823
1823
1824
1824
if (Context.LangOpts .hasFeature (Feature::InferSendableFromCaptures)) {
1825
1825
// All global functions should be @Sendable
1826
- if (!funcDecl->getDeclContext ()->isTypeContext () &&
1827
- !funcDecl->getDeclContext ()->isLocalContext ()) {
1826
+ if (funcDecl->getDeclContext ()->isModuleScopeContext ()) {
1828
1827
funcType =
1829
1828
funcType->withExtInfo (funcType->getExtInfo ().withConcurrent ());
1830
1829
}
@@ -1849,7 +1848,8 @@ ConstraintSystem::getTypeOfReference(ValueDecl *value,
1849
1848
if (isForCodeCompletion () && openedType->hasError ()) {
1850
1849
// In code completion, replace error types by placeholder types so we can
1851
1850
// 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 );
1853
1853
}
1854
1854
1855
1855
// If we opened up any type variables, record the replacements.
You can’t perform that action at this time.
0 commit comments