mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In the new code-completion path, expose an option to control this behaviour; in the old path turn it off. rdar://31113161
21 lines
881 B
Swift
21 lines
881 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 -check-prefix=CALL_PATTERN
|
|
// CALL_PATTERN: key.kind: source.lang.swift.decl.function.constructor
|
|
|
|
// RUN: %sourcekitd-test -req=complete.open -pos=7:11 %s -- %s | %FileCheck %s -check-prefix=NO_PATTERN
|
|
// NO_PATTERN-NOT: key.kind: source.lang.swift.decl.function.constructor
|
|
|
|
// RUN: %sourcekitd-test -req=complete.open -req-opts=callpatternheuristics=1 -pos=7:11 %s -- %s | %FileCheck %s -check-prefix=NO_PATTERN
|
|
// NO_PATTERN-NOT: key.kind: source.lang.swift.decl.function.constructor
|
|
|
|
// RUN: %sourcekitd-test -req=complete.open -req-opts=callpatternheuristics=0 -pos=7:11 %s -- %s | %FileCheck %s -check-prefix=CALL_PATTERN
|
|
// NO_PATTERN-NOT: key.kind: source.lang.swift.decl.function.constructor
|