Closed
Description
Description
The Swift toolchain should be able to provide full autocompletion results for macros when they're defined in a strongly-typed way in source code.
Reproduction
/// Encodes enums in a custom way.
/// The `fatalError()`s won't even be present anywhere in the code,
/// they are just to make the code compile and not require use to do e.g `default: String? = nil`.
macro CodableEnum(
default: String = { fatalError() }(),
conformances: [CodableEnumConformance] = { fatalError() }()
) = #externalMacro(
module: "CodableEnumMacro",
type: "CodableEnumMacroType"
)
When trying to annotate a type with this macro, there is no autocompletion results for e.g. CodableEnum(conformances:)
, but when you type that out, it'll provide autocompletion results for the elements of the array of conformances
and when you e.g. write conformances: [.so]
it'll show autocompletion for .something
.
Expected behavior
Autocomplete like normal Swift code.
Environment
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.51 clang-1500.1.0.2.2)
Target: arm64-apple-macosx14.0
Additional information
No response