File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,15 @@ void ArgumentTypeCheckCompletionCallback::deliverResults(
231
231
SemanticContext = SemanticContextKind::CurrentNominal;
232
232
}
233
233
}
234
+ if (SemanticContext == SemanticContextKind::None && Result.FuncD ) {
235
+ if (Result.FuncD ->getDeclContext ()->isTypeContext ()) {
236
+ SemanticContext = SemanticContextKind::CurrentNominal;
237
+ } else if (Result.FuncD ->getDeclContext ()->isLocalContext ()) {
238
+ SemanticContext = SemanticContextKind::Local;
239
+ } else if (Result.FuncD ->getModuleContext () == DC->getParentModule ()) {
240
+ SemanticContext = SemanticContextKind::CurrentModule;
241
+ }
242
+ }
234
243
if (Result.IsSubscript ) {
235
244
assert (SemanticContext != SemanticContextKind::None);
236
245
auto *SD = dyn_cast_or_null<SubscriptDecl>(Result.FuncD );
You can’t perform that action at this time.
0 commit comments