File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed
stdlib/public/SDK/Foundation
test/Inputs/clang-importer-sdk Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,16 @@ public typealias NSErrorPointer = AutoreleasingUnsafeMutablePointer<NSError?>?
24
24
// Note: NSErrorPointer becomes ErrorPointer in Swift 3.
25
25
public typealias ErrorPointer = NSErrorPointer
26
26
27
- public // COMPILER_INTRINSIC
28
- let _nilObjCError : Error = _GenericObjCError. nilError
27
+ // An error value to use when an Objective-C API indicates error
28
+ // but produces a nil error object.
29
+ // This is 'internal' rather than 'private' for no other reason but to make the
30
+ // type print more nicely. It's not part of the ABI, so if type printing of
31
+ // private things improves we can change it.
32
+ internal enum _GenericObjCError : Error {
33
+ case nilError
34
+ }
35
+ // A cached instance of the above in order to save on the conversion to Error.
36
+ private let _nilObjCError : Error = _GenericObjCError. nilError
29
37
30
38
public // COMPILER_INTRINSIC
31
39
func _convertNSErrorToError( _ error: NSError ? ) -> Error {
@@ -335,12 +343,6 @@ extension CFError : Error {
335
343
}
336
344
}
337
345
338
- // An error value to use when an Objective-C API indicates error
339
- // but produces a nil error object.
340
- public enum _GenericObjCError : Error {
341
- case nilError
342
- }
343
-
344
346
/// An internal protocol to represent Swift error enums that map to standard
345
347
/// Cocoa NSError domains.
346
348
public protocol _ObjectiveCBridgeableError : Error {
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ extension NSError : Error {
169
169
public var _code : Int { return code }
170
170
}
171
171
172
- public enum _GenericObjCError : Error {
172
+ internal enum _GenericObjCError : Error {
173
173
case nilError
174
174
}
175
175
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ extension NSError : Error {
230
230
public var _code : Int { return code }
231
231
}
232
232
233
- public enum _GenericObjCError : Error {
233
+ internal enum _GenericObjCError : Error {
234
234
case nilError
235
235
}
236
236
You can’t perform that action at this time.
0 commit comments