swift
95e668f8 - [CodeCompletion] Avoid crash for not recommended item without a decl

Commit
3 years ago
[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 (cherry picked from commit e748ab41a3ddc1beeb5bad56ddec1c2720da7e2f)
Author
Committer
Parents
Loading