mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This hooks up call argument position completion to the typeCheckForCodeCompletion API to generate completions from all the solutions the constraint solver produces (even those requiring fixes), rather than relying on a single solution being applied to the AST (if any). Co-authored-by: Nathan Hawes <nathan.john.hawes@gmail.com>
16 lines
389 B
Swift
16 lines
389 B
Swift
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token COMPLETE
|
|
|
|
@resultBuilder public struct ViewBuilder {
|
|
static func buildBlock(_ content: TextField) -> TextField { fatalError() }
|
|
}
|
|
|
|
struct TextField {
|
|
init(_ title: String, text: String) {}
|
|
}
|
|
|
|
struct EncodedView {
|
|
@ViewBuilder var body: TextField {
|
|
TextField("Encoded", #^COMPLETE^#)
|
|
}
|
|
}
|