mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeCompletion] Enable custom attribute completion for func decl
rdar://problem/50352482
This commit is contained in:
@@ -5375,9 +5375,11 @@ void CodeCompletionCallbacksImpl::doneParsing() {
|
||||
case CompletionKind::AttributeBegin: {
|
||||
Lookup.getAttributeDeclCompletions(IsInSil, AttTargetDK);
|
||||
|
||||
// Provide any type name for property delegate.
|
||||
// TypeName at attribute position after '@'.
|
||||
// - VarDecl: Property Wrappers.
|
||||
// - ParamDecl/VarDecl/FuncDecl: Function Buildres.
|
||||
if (!AttTargetDK || *AttTargetDK == DeclKind::Var ||
|
||||
*AttTargetDK == DeclKind::Param)
|
||||
*AttTargetDK == DeclKind::Param || *AttTargetDK == DeclKind::Func)
|
||||
Lookup.getTypeCompletionsInDeclContext(
|
||||
P.Context.SourceMgr.getCodeCompletionLoc());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user