mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CodeCompletion] Fix placeholder rendering for addSimpleNamedParameter()
When parameter is added by addSimpleNamedParameter(), the type name doesn't exist. Instead of printing empty strings, use short version of editor placeholders. rdar://83904268
This commit is contained in:
@@ -410,7 +410,7 @@ constructTextForCallParam(ArrayRef<CodeCompletionString::Chunk> ParamGroup,
|
||||
OS << "<#T##" << Display;
|
||||
if (Display == Type && Display == ExpansionType) {
|
||||
// Short version, display and type are the same.
|
||||
} else {
|
||||
} else if (!Type.empty()) {
|
||||
OS << "##" << Type;
|
||||
if (ExpansionType != Type)
|
||||
OS << "##" << ExpansionType;
|
||||
|
||||
Reference in New Issue
Block a user