mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeCompletion] Introduce "Flair" in code completion
To describe fine grained priorities. Introduce 'CodeCompletionFlair' that is a set of more descriptive flags for prioritizing completion items. This aims to replace ' SemanticContextKind::ExpressionSpecific' which was a "catch all" prioritization flag.
This commit is contained in:
@@ -27,7 +27,7 @@ func testConstructor() {
|
||||
// CONSTRUCTOR: Begin completions
|
||||
// CONSTRUCTOR-NOT: Pattern/{{.*}}
|
||||
// CONSTRUCTOR-NOT: Decl[Constructor]
|
||||
// CONSTRUCTOR: Pattern/ExprSpecific: {#a: Int#}[#Int#]
|
||||
// CONSTRUCTOR: Pattern/Local/Flair[ExprSpecific]: {#a: Int#}[#Int#]
|
||||
// CONSTRUCTOR-NOT: Pattern/{{.*}}
|
||||
// CONSTRUCTOR-NOT: Decl[Constructor]
|
||||
// CONSTRUCTOR: End completions
|
||||
@@ -38,7 +38,7 @@ func testArg2Name3() {
|
||||
firstArg(#^LABELED_FIRSTARG^#,
|
||||
// LABELED_FIRSTARG: Begin completions
|
||||
// LABELED_FIRSTARG-NOT: ['(']{#arg1: Int#}, {#arg2: Int#}[')'][#Void#];
|
||||
// LABELED_FIRSTARG-DAG: Pattern/ExprSpecific: {#arg1: Int#}[#Int#];
|
||||
// LABELED_FIRSTARG-DAG: Pattern/Local/Flair[ExprSpecific]: {#arg1: Int#}[#Int#];
|
||||
// LABELED_FIRSTARG-NOT: ['(']{#arg1: Int#}, {#arg2: Int#}[')'][#Void#];
|
||||
// LABELED_FIRSTARG: End completions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user