Skip to content

Commit b888b0b

Browse files
committed
Correction for building with optional @escaping closure on the init of NSMutableData missed previously
1 parent 9770256 commit b888b0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Foundation/NSData.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,8 @@ extension CFData : _NSBridgable, _SwiftBridgable {
862862
open class NSMutableData : NSData {
863863
internal var _cfMutableObject: CFMutableData { return unsafeBitCast(self, to: CFMutableData.self) }
864864

865-
public override init(bytes: UnsafeMutableRawPointer?, length: Int, copy: Bool = false, deallocator: (@escaping (UnsafeMutableRawPointer, Int) -> Void)? = nil) {
865+
// NOTE: the deallocator block here is implicitly @escaping by virtue of it being optional
866+
public override init(bytes: UnsafeMutableRawPointer?, length: Int, copy: Bool = false, deallocator: (/*@escaping*/ (UnsafeMutableRawPointer, Int) -> Void)? = nil) {
866867
super.init(bytes: bytes, length: length, copy: copy, deallocator: deallocator)
867868
}
868869
public init() {

0 commit comments

Comments
 (0)