mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When completing in cases like `bar(arg: foo(|, option: 1)`, we don’t know if `option` belongs to the call to `foo` or `bar`. Be defensive and also suggest the signature.
15 lines
355 B
Swift
15 lines
355 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
|
|
|
|
// CHECK: key.kind: source.lang.swift.decl.function.constructor
|
|
// CHECK-NEXT: key.name: "foo:"
|