mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This removes the distinction between argument completions and postfix expr paren completions, which was meaningless since solver-based completion. It then determines whether to suggest the entire function call pattern (with all argument labels) or only a single argument based on whether there are any existing arguments in the call. For this to work properly, we need to improve parser recovery a little bit so that it parsers arguments after the code completion token properly. This should make call pattern heuristics obsolete. rdar://84809503
16 lines
416 B
Swift
16 lines
416 B
Swift
struct S {
|
|
init(foo: Int) {}
|
|
}
|
|
func takeS(_: S, other: Int) {}
|
|
|
|
func test() {
|
|
takeS(S(, other: 2)
|
|
}
|
|
|
|
// RUN: %sourcekitd-test -req=complete -pos=7:11 %s -- %s | %FileCheck %s
|
|
// RUN: %sourcekitd-test -req=complete.open -pos=7:11 %s -- %s | %FileCheck %s
|
|
// RUN: %sourcekitd-test -req=complete.open -pos=7:11 %s -- %s | %FileCheck %s
|
|
|
|
// CHECK: key.kind: source.lang.swift.pattern
|
|
// CHECK-NEXT: key.name: "foo:"
|