Keep the symbol name as the one for the variable, not the function, we only want the return type symbol

This commit is contained in:
RUSshy 2021-08-31 16:25:27 +02:00 committed by GitHub
parent 853a134ae7
commit d48c1a5ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -772,7 +772,7 @@ AutocompleteResponse.Completion makeSymbolCompletionInfo(const DSymbol* symbol,
// TODO: should probably make it fully recursive, // TODO: should probably make it fully recursive,
if(s.type && s.type.kind == CompletionKind.functionName) s = s.type; if(s.type && s.type.kind == CompletionKind.functionName) s = s.type;
definition = s.type.name ~ ' ' ~ s.name; definition = s.type.name ~ ' ' ~ symbol.name;
} }
else if (kind == CompletionKind.enumMember) else if (kind == CompletionKind.enumMember)
definition = symbol.name; // TODO: add enum value to definition string definition = symbol.name; // TODO: add enum value to definition string