mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "Name and label changes for closure parameters (for review only) (#2981)"
This reverts commit 18406900ba.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user