Files
swift-mirror/test/SourceKit/CodeComplete/complete_unresolvedmember.swift.response
Alex Hoppen 5d01a097e1 [CodeCompletion] Don't distinguish convertible and idenical type relation
I think that preferring identical over convertible makes sense in e.g. C++ where we have implicit user-defined type conversions but since we don’t have them in Swift, I think the distinction doesn’t make too much sense, because if we have a `func foo(x: Int?)`, want don’t really want to  prioritize variables of type `Int?` over `Int` Similarly if we have `func foo(x: View)`, we don’t want to prioritize a variable of type `View` over e.g. `Text`.

rdar://91349364
2022-04-13 08:28:17 +02:00

90 lines
3.4 KiB
Plaintext

{
key.results: [
{
key.kind: source.lang.swift.decl.function.method.class,
key.name: "create()",
key.sourcetext: "create()",
key.description: "create()",
key.typename: "Foo",
key.context: source.codecompletion.context.exprspecific,
key.typerelation: source.codecompletion.typerelation.convertible,
key.num_bytes_to_erase: 0,
key.associated_usrs: "s:25complete_unresolvedmember3FooO6createACyFZ",
key.modulename: "complete_unresolvedmember"
},
{
key.kind: source.lang.swift.decl.enumelement,
key.name: "east",
key.sourcetext: "east",
key.description: "east",
key.typename: "Foo",
key.context: source.codecompletion.context.exprspecific,
key.typerelation: source.codecompletion.typerelation.convertible,
key.num_bytes_to_erase: 0,
key.associated_usrs: "s:25complete_unresolvedmember3FooO4eastyA2CmF",
key.modulename: "complete_unresolvedmember"
},
{
key.kind: source.lang.swift.decl.function.constructor,
key.name: "init(i:)",
key.sourcetext: "init(i: <#T##Int#>)",
key.description: "init(i: Int)",
key.typename: "Foo",
key.context: source.codecompletion.context.thisclass,
key.typerelation: source.codecompletion.typerelation.convertible,
key.num_bytes_to_erase: 0,
key.associated_usrs: "s:25complete_unresolvedmember3FooO1iACSi_tcfc",
key.modulename: "complete_unresolvedmember"
},
{
key.kind: source.lang.swift.decl.function.constructor,
key.name: "init(s:)",
key.sourcetext: "init(s: <#T##String#>)",
key.description: "init(s: String)",
key.typename: "Foo",
key.context: source.codecompletion.context.thisclass,
key.typerelation: source.codecompletion.typerelation.convertible,
key.num_bytes_to_erase: 0,
key.associated_usrs: "s:25complete_unresolvedmember3FooO1sACSS_tcfc",
key.modulename: "complete_unresolvedmember"
},
{
key.kind: source.lang.swift.decl.var.class,
key.name: "instance",
key.sourcetext: "instance",
key.description: "instance",
key.typename: "Foo",
key.context: source.codecompletion.context.exprspecific,
key.typerelation: source.codecompletion.typerelation.convertible,
key.num_bytes_to_erase: 0,
key.associated_usrs: "s:25complete_unresolvedmember3FooO8instanceACvpZ",
key.modulename: "complete_unresolvedmember"
},
{
key.kind: source.lang.swift.decl.enumelement,
key.name: "other()",
key.sourcetext: "other(<#T##String#>)",
key.description: "other(String)",
key.typename: "Foo",
key.context: source.codecompletion.context.exprspecific,
key.typerelation: source.codecompletion.typerelation.convertible,
key.num_bytes_to_erase: 0,
key.associated_usrs: "s:25complete_unresolvedmember3FooO5otheryACSScACmF",
key.modulename: "complete_unresolvedmember"
},
{
key.kind: source.lang.swift.decl.enumelement,
key.name: "west",
key.sourcetext: "west",
key.description: "west",
key.typename: "Foo",
key.context: source.codecompletion.context.exprspecific,
key.typerelation: source.codecompletion.typerelation.convertible,
key.num_bytes_to_erase: 0,
key.associated_usrs: "s:25complete_unresolvedmember3FooO4westyA2CmF",
key.modulename: "complete_unresolvedmember"
}
],
key.kind: source.lang.swift.completion.unresolvedmember
}