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
381 B
Swift
16 lines
381 B
Swift
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token COMPLETE
|
|
|
|
@dynamicMemberLookup public struct Binding<Value> {
|
|
subscript<Subject>(dynamicMember keyPath: WritableKeyPath<Value, Subject>) -> Binding<Subject> {
|
|
fatalError()
|
|
}
|
|
}
|
|
|
|
struct Foo {
|
|
var bar: Binding<[String]>
|
|
|
|
func test(index: Int) {
|
|
_ = bar[#^COMPLETE^#index]
|
|
}
|
|
}
|