mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Calling '@objc optional func' requires '?' or '!' after its name. When completing method calls for them, 'key.sourcetext' should have '?' whereas 'key.name' shouldn't. Note that we deliberately do not use optional type name for 'key.typename'. This is consistent with optional chain '?.<propertyName>' behavior. rdar://problem/37904574
25 lines
743 B
Plaintext
25 lines
743 B
Plaintext
{
|
|
key.results: [
|
|
{
|
|
key.kind: source.lang.swift.decl.function.method.instance,
|
|
key.name: "optionalMethod()",
|
|
key.sourcetext: "optionalMethod?()",
|
|
key.description: "optionalMethod?()",
|
|
key.typename: "Int",
|
|
key.context: source.codecompletion.context.superclass,
|
|
key.num_bytes_to_erase: 0,
|
|
key.associated_usrs: "c:@M@complete_optionalmethod@objc(pl)Proto(im)optionalMethod",
|
|
key.modulename: "complete_optionalmethod"
|
|
},
|
|
{
|
|
key.kind: source.lang.swift.keyword,
|
|
key.name: "self",
|
|
key.sourcetext: "self",
|
|
key.description: "self",
|
|
key.typename: "T",
|
|
key.context: source.codecompletion.context.thisclass,
|
|
key.num_bytes_to_erase: 0
|
|
}
|
|
]
|
|
}
|