Files
swift-mirror/test/SourceKit/CodeComplete/complete_with_closure_param.swift
Argyrios Kyrtzidis 8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00

21 lines
686 B
Swift

typealias MyFnTy = Int->Int
class C {
func foo(x: Int->Int) {}
func foo2(x: MyFnTy) {}
}
C().
// RUN: %sourcekitd-test -req=complete -pos=7:5 %s -- %s | FileCheck %s
// CHECK: key.kind: source.lang.swift.decl.function.method.instance,
// CHECK-NEXT: key.name: "foo(x:)",
// CHECK-NEXT: key.sourcetext: "foo(<#T##x: Int -> Int##Int -> Int#>)",
// CHECK-NEXT: key.description: "foo(x: Int -> Int)",
// CHECK-NEXT: key.typename: "Void",
// CHECK: key.kind: source.lang.swift.decl.function.method.instance,
// CHECK-NEXT: key.name: "foo2(x:)",
// CHECK-NEXT: key.sourcetext: "foo2(<#T##x: MyFnTy##MyFnTy##Int -> Int#>)",
// CHECK-NEXT: key.description: "foo2(x: MyFnTy)",