Revert "Name and label changes for closure parameters (for review only) (#2981)"

This reverts commit 18406900ba.
This commit is contained in:
Michael Gottesman
2016-07-15 19:45:26 -07:00
parent ac5a9789e7
commit 40e1991e12
65 changed files with 350 additions and 382 deletions

View File

@@ -76,8 +76,7 @@ extension Optional {
/// `body` is complicated than that results in unnecessarily repeated code.
internal func _withNilOrAddress<NSType : AnyObject, ResultType>(
of object: inout NSType?,
_ body:
@noescape (AutoreleasingUnsafeMutablePointer<NSType?>?) -> ResultType
body: @noescape (AutoreleasingUnsafeMutablePointer<NSType?>?) -> ResultType
) -> ResultType {
return self == nil ? body(nil) : body(&object)
}
@@ -496,9 +495,7 @@ extension String {
// enumerateLinesUsing:(void (^)(NSString *line, BOOL *stop))block
/// Enumerates all the lines in a string.
public func enumerateLines(
invoking body: (line: String, stop: inout Bool) -> ()
) {
public func enumerateLines(_ body: (line: String, stop: inout Bool) -> ()) {
_ns.enumerateLines {
(line: String, stop: UnsafeMutablePointer<ObjCBool>)
in
@@ -529,7 +526,7 @@ extension String {
scheme tagScheme: String,
options opts: NSLinguisticTagger.Options = [],
orthography: NSOrthography? = nil,
invoking body:
_ body:
(String, Range<Index>, Range<Index>, inout Bool) -> ()
) {
_ns.enumerateLinguisticTags(