Files
swift-mirror/test/SourceKit/CodeComplete/complete_name.swift
Ben Langmuir 7b3bd75b2a [SourceKit] Omit internal parameters from filter name
The internal parameter names are just there to give an extra hint in the
source text for what the argument is. Consequently, we don't want to
allow filtering to match against them.
2016-01-14 14:37:14 -08:00

21 lines
531 B
Swift

// RUN: %complete-test -raw -tok=INIT_NAME %s | FileCheck %s -check-prefix=INIT_NAME
// RUN: %complete-test -raw -tok=METHOD_NAME %s | FileCheck %s -check-prefix=METHOD_NAME
struct S {
init(a: Int, b: Int, _ c: Int) {}
init(_ a: Int, _ b: Int) {}
func foo1(a: Int, _ b: Int, _ c: Int) {}
func foo2(a a: Int, b: Int, c: Int) {}
}
func test01() {
S(#^INIT_NAME^#)
}
// INIT_NAME: key.name: "a:b::)"
func test02(x: S) {
x.#^METHOD_NAME^#
}
// METHOD_NAME: key.name: "foo1(:::)"
// METHOD_NAME: key.name: "foo2(a:b:c:)"