@@ -421,7 +421,7 @@ extension __BridgedNSError where Self: RawRepresentable, Self.RawValue: SignedIn
421
421
}
422
422
}
423
423
424
- public extension __BridgedNSError where Self: RawRepresentable , Self. RawValue: SignedInteger {
424
+ extension __BridgedNSError where Self: RawRepresentable , Self. RawValue: SignedInteger {
425
425
public var _domain : String { return Self . _nsErrorDomain }
426
426
public var _code : Int { return Int ( rawValue) }
427
427
@@ -447,7 +447,7 @@ extension __BridgedNSError where Self: RawRepresentable, Self.RawValue: Unsigned
447
447
}
448
448
}
449
449
450
- public extension __BridgedNSError where Self: RawRepresentable , Self. RawValue: UnsignedInteger {
450
+ extension __BridgedNSError where Self: RawRepresentable , Self. RawValue: UnsignedInteger {
451
451
public var _domain : String { return Self . _nsErrorDomain }
452
452
public var _code : Int {
453
453
return Int ( bitPattern: UInt ( rawValue) )
@@ -499,7 +499,7 @@ public protocol _BridgedStoredNSError : __BridgedNSError, _ObjectiveCBridgeableE
499
499
}
500
500
501
501
/// Various helper implementations for _BridgedStoredNSError
502
- public extension _BridgedStoredNSError where Code: RawRepresentable , Code. RawValue: SignedInteger {
502
+ extension _BridgedStoredNSError where Code: RawRepresentable , Code. RawValue: SignedInteger {
503
503
// FIXME: Generalize to Integer.
504
504
public var code : Code {
505
505
return Code ( rawValue: numericCast ( _nsError. code) ) !
@@ -515,11 +515,11 @@ public extension _BridgedStoredNSError where Code: RawRepresentable, Code.RawVal
515
515
516
516
/// The user-info dictionary for an error that was bridged from
517
517
/// NSError.
518
- var userInfo : [ String : Any ] { return errorUserInfo }
518
+ public var userInfo : [ String : Any ] { return errorUserInfo }
519
519
}
520
520
521
521
/// Various helper implementations for _BridgedStoredNSError
522
- public extension _BridgedStoredNSError where Code: RawRepresentable , Code. RawValue: UnsignedInteger {
522
+ extension _BridgedStoredNSError where Code: RawRepresentable , Code. RawValue: UnsignedInteger {
523
523
// FIXME: Generalize to Integer.
524
524
public var code : Code {
525
525
return Code ( rawValue: numericCast ( _nsError. code) ) !
@@ -535,7 +535,7 @@ public extension _BridgedStoredNSError where Code: RawRepresentable, Code.RawVal
535
535
}
536
536
537
537
/// Implementation of __BridgedNSError for all _BridgedStoredNSErrors.
538
- public extension _BridgedStoredNSError {
538
+ extension _BridgedStoredNSError {
539
539
/// Default implementation of ``init(_bridgedNSError)`` to provide
540
540
/// bridging from NSError.
541
541
public init ? ( _bridgedNSError error: NSError ) {
@@ -690,7 +690,7 @@ public extension CocoaError {
690
690
}
691
691
}
692
692
693
- public extension CocoaError {
693
+ extension CocoaError {
694
694
public static func error( _ code: CocoaError . Code , userInfo: [ AnyHashable : Any ] ? = nil , url: URL ? = nil ) -> Error {
695
695
var info : [ String : Any ] = userInfo as? [ String : Any ] ?? [ : ]
696
696
if let url = url {
@@ -855,7 +855,7 @@ public struct URLError : _BridgedStoredNSError {
855
855
}
856
856
}
857
857
858
- public extension URLError {
858
+ extension URLError {
859
859
private var _nsUserInfo : [ AnyHashable : Any ] {
860
860
return _nsError. userInfo
861
861
}
@@ -871,7 +871,7 @@ public extension URLError {
871
871
}
872
872
}
873
873
874
- public extension URLError {
874
+ extension URLError {
875
875
public static var unknown : URLError . Code { return . unknown }
876
876
public static var cancelled : URLError . Code { return . cancelled }
877
877
public static var badURL : URLError . Code { return . badURL }
0 commit comments