[AST] Preserve parameter names in TypeReprs of function types.

Also fixup 'test/SourceKit/CodeExpand/code-expand.swift' and use the syntax
for adding parameter names with an underscore for first name.
This commit is contained in:
Argyrios Kyrtzidis
2016-08-08 22:24:27 -07:00
parent 8b1dde645a
commit 1e9bae34a3
5 changed files with 44 additions and 11 deletions

View File

@@ -1,5 +1,3 @@
// REQUIRES: se_0111_complete
// RUN: %sourcekitd-test -req=expand-placeholder %s | FileCheck %s
foo(x: <#T##() -> Void#>)
@@ -17,7 +15,7 @@ anArr.indexOfObjectPassingTest(<#T##predicate: ((AnyObject!, Int, UnsafePointer<
// CHECK-NEXT: <#code#>
// CHECK-NEXT: }
anArr.indexOfObjectPassingTest(<#T##predicate: ((obj: AnyObject!, idx: Int, stop: UnsafePointer<ObjCBool>) -> Bool)?##((obj: AnyObject!, idx: Int, stop: UnsafePointer<ObjCBool>) -> Bool)?#>)
anArr.indexOfObjectPassingTest(<#T##predicate: ((_ obj: AnyObject!, _ idx: Int, _ stop: UnsafePointer<ObjCBool>) -> Bool)?##((_ obj: AnyObject!, _ idx: Int, _ stop: UnsafePointer<ObjCBool>) -> Bool)?#>)
// CHECK: anArr.indexOfObjectPassingTest { (obj, idx, stop) -> Bool in
// CHECK-NEXT: <#code#>
// CHECK-NEXT: }