You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CodeCompletion] Avoid crash for not recommended item without a decl
Generating diagnostics for "not recommended" items requires an
associated declaration. However, cases like this:
func test(fn: (Int) async -> Void) {
fn(#^HERE^#)
}
For the function call pattern item, there's no associated decl because
the callee is an expression. Ideally it should emit a diagnostic, but
for now, to avoid the crash, don't emit diagnostics unless the item has
the associated decl.
rdar://95306033
// ACTOR-DAG: Decl[InstanceMethod]/CurrNominal/NotRecommended: receiveNonSendable({#arg: MyNonSendable#})[' async'][#Void#]; name=receiveNonSendable(arg:); diagnostics=warning:actor-isolated 'receiveNonSendable(arg:)' should only be referenced from inside the actor{{$}}
0 commit comments