Files
swift-mirror/test/SourceKit/CodeComplete/complete_with_closure_param.swift
Alex Hoppen 7ce41252e7 [SourceKit] Print compilerargs and sourcetext keys last
That way, when the request gets truncated by os_log in sourcekit-lsp, we see most of the request. Most likely the sourcetext and the compiler args wouldn't have made it into the log message completely anyway.

rdar://121322828
2024-02-29 20:45:55 -08:00

21 lines
692 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(:)",
// CHECK-NEXT: key.description: "foo(x: (Int) -> Int)",
// CHECK-NEXT: key.typename: "Void",
// CHECK: key.sourcetext: "foo(<#T##x: (Int) -> Int##(Int) -> Int#>)"
// CHECK: key.kind: source.lang.swift.decl.function.method.instance,
// CHECK-NEXT: key.name: "foo2(:)",
// CHECK-NEXT: key.description: "foo2(x: (Int) -> Int)",
// CHECK: key.sourcetext: "foo2(<#T##x: (Int) -> Int##(Int) -> Int#>)"